daniebker

Update: Added LastMod to the theme

· [Daniel Baker]

I made a fork of the original Paper 5.0 theme I’m using. I’ve updated it to add a new config element which is showLastMod. This enables a new attribute to be shown right below the author of a post that shows the last time the post was modified. For posts this is kind of useful as you can see how outdated the information is in a given post. However, I think it’s helpful most of all in the Doom Emacs Cheatsheet page. Now it’s easier to see how frequently this information is updated and when it was last modified with new, or updated, information.

The LastMod property is picked up from a pages frontmatter. If it’s not set then it defaults to the date property on the frontmatter if enableGitInfo is false. If enableGitInfo is true then Hugo uses the .GitInfo.AuthorDate property to set the last modified date, pretty neat.

I’ll probably make a pull request to get this into the main theme, if the author allows it. I’d like to stop maintaining my own fork if I don’t have to. If you’re interested you can find the changes on this branch of the fork.