Hugo, the tool I’m currently using for this blog, defines a few fields for a post’s date:
-
date
is the default, generic date for a post, and the one used for other fields if they’re not specified. -
lastmod
is the date content was last modified. -
publishDate
is the date at which the content should be published. If in the future, the tool won’t include the post. -
expiryDate
is the date beyond whichhugo
will no longer render a post.
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:
-
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. -
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. -
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.
-
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. -
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 changelastmod
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.
-
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. ↩︎
-
Or abandoned, as the old cliché goes. ↩︎
-
Not that LiveJournal isn’t still around, but I deleted my blog there years ago. ↩︎