jekyll-sitemap icon indicating copy to clipboard operation
jekyll-sitemap copied to clipboard

Deducing <lastmod> from git log on a GitHub Pages site

Open sh1boot opened this issue 1 year ago • 2 comments

I see several other bugs here mentioning jekyll-last-modified-at as the source of truth for modification dates, but that plugin is not mentioned in the GitHub Pages Dependency Versions.

Am I right to deduce that this means that the default GitHub Pages deployment can't produce correct modification dates because of this? Or is there another way?

sh1boot avatar May 31 '24 20:05 sh1boot

GitHub pages only provides a limited set of plugins that can run in a GitHub pages build environment. Essentially any GitHub pages Jekyll build i.e. compile to static is done with the --safe option disabling any plugins, but GitHub pages includes a few directly which are allowed. Anything not listed in the dependency versions list, means it won't be available.

If you want to use the jekyll-last-modified-at plugin, you can't use GitHub pages directly to build your site, but you can still host it on GitHub pages. You'll however need to have another process build/compile the Jekyll and then upload the build to the _site directory on your GitHub pages branch.

Without doing the above, you are limited to setting it in front-end matter files.

For clarification, see the note on the Jekyll plugin installation information "Plugins on GitHub Pages"

jamesmacwhite avatar Jun 23 '24 06:06 jamesmacwhite

@sh1boot yes, there is another way to do this: #316.

nisbet-hubbard avatar Aug 08 '24 22:08 nisbet-hubbard