A Note on Dates

Posted: 2021-07-02
Word Count: 515
Tags: blog hugo

Hugo, the tool I’m currently using for this blog, defines a few fields for a post’s date:

Currently I only use date and lastmod. I had problems getting publishDate to show up in my templates, and and I have no use for expiryDate. In the “Most Recently Updated” table at the bottom of my templates, “Posted” is date, and “Modified” is lastmod.

However, some (probably bad) habits complicate this tidy scheme:

  1. The “new content” template fills in date with the date and time I create the Markdown file for an article. Often I don’t finish writing an article for days, weeks, or longer.

  2. Hugo also uses a draft flag to exclude articles not ready for publication. I might have a few (or several, or a dozen) articles in Draft mode at any one time. Sometimes I truly haven’t finished writing them yet; other times I just want to give them a once-over before I unmark them.

  3. Hugo generates static files that I have to manually upload to http://frank-mitchell.com.1 This means that, once “finished”2, an article might sit on my computer for a week (or a month) before it shows up on the site.

  4. As noted in previous posts, I occasionally backfill this blog with stuff I posted on defunct sites Like Google+, LiveJournal3, Penandpapergames.com, and previous iterations of this site. In those cases I set the Hugo date to the date on which I originally posted, and (sometimes) lastmod to the date on which I added color commentary or other substantial changes.

  5. Sometimes I’ll change a post that’s been on the site for a while without changing lastmod. Usually it’s a matter of fixing typos, correcting markup (Markdown), adding or changing tags, and other tweaks that don’t really alter the sense of what I wrote. If I add, delete, or change a large block of text, I’ll usually change lastmod and leave a “note” of what changed … but sometimes I slip.

So, on the off chance someone subscribes to this site’s RSS feed, that’s why sometimes a whole bunch of new content appears all at once, sometimes dated years in the past. For those who pay really close attention, it’s also why a few articles change slighly without comment.


  1. Creating and uploading the new site files pretty routine, but I still have to run the tool, tar the results, log onto the hosting site, upload the tarball, and unarchive it. There’s probably a clever way to automate this using shell scripts and FTP, but enabling FTP access and keeping the password on my local machine might weaken the hosting provider’s security. ↩︎

  2. Or abandoned, as the old clich√© goes. ↩︎

  3. Not that LiveJournal isn’t still around, but I deleted my blog there years ago. ↩︎