Some of the posts on here get updated. For example, I change effective privacy tips as the available services and settings change. (If you’re in California, go do DROP which I added recently.) And sometimes I add a “More” link to the end of a post I wrote more about later, or just fix an error.

Previously every post just had the blog date, from the yaml_metadata_block at the top of the source file. (more info: Metadata blocks) But that’s the date I originally wrote something, so it’s the wrong date to use for an XML sitemap or for the RSS feed of recently changed pages. Since I build sitemaps and RSS from the generated HTML, I need to put two dates in each HTML page. The meta tags for that look something like this.

<meta content="2024-01-01"
 name="dcterms.date">
<meta content="2024-01-01"
 property="article:published_time">
<meta content="2026-02-27"
 property="article:modified_time">

The dcterms.date and article:published_time are the original date from the metadata block, in YYYY-MM-DD format. The modified_time has to be obtained from git, using git log, like this:

That’s gitdate.sh that runs in order to populate the Pandoc command line. I’m using UTC here because the server is on UTC and it would be confusing for a crawler to have HTTP Date headers in one time zone and meta tags populated from a different one. Besides, I’m from Indiana originally so time zones make my brain hurt.