hugo-theme-nix icon indicating copy to clipboard operation
hugo-theme-nix copied to clipboard

Add support for Lastmod on pages

Open EddMCambs opened this issue 4 months ago • 0 comments

I'm not sure if this is something that wants to be included in the main repo, as it's starting to get away from Nix's "Simple" tag, but I wanted it for my website, so I decided to at least offer it here.

This update modifies the single.html template to add support for hugo's Lastmod. It retains compatibility with #85, in that it will not try to display if showpostdate is set to false.

This should be a no-op for any existing site, as it will only do anything if lastmod: is set in the page's frontmatter, but there's an edge case if the site has enableGitInfo set to true in the site config, so I added a note to the readme.md to detail this.

If you want to see what this looks like in action, my fork is currently live on my personal website. There's only one page using it at the moment, and it's here: https://i.am.eddmil.es/posts/clevis-tang-truenas-scale/

EddMCambs avatar Oct 19 '24 09:10 EddMCambs