You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
We should have a "Last updated" or "Last edited" on each page #87
I completely agree. Manually updating dates is tedious and guaranteed to fall out of sync eventually. Pulling it directly from the Git commit history is the only way to keep it perfectly accurate without the mental overhead.
Since just-the-docs natively supports it, the cleanest approach is to use the jekyll-last-modified-at plugin. Because this plugin isn't on the strict whitelist for the legacy GitHub Pages build process, you just need to use GitHub Actions to build the site (which is GitHub's recommended default now anyway).
Here is the exact setup to make it automatic:
1. Update your Gemfile
Add the plugin to your jekyll_plugins group:
group:jekyll_pluginsdogem"jekyll-feed","~> 0.12"gem"jekyll-last-modified-at"# Add this lineend
2. Update _config.yml
Tell Jekyll to use the plugin and tell just-the-docs to format the timestamp:
Under Build and deployment, change the Source dropdown from "Deploy from a branch" to "GitHub Actions".
GitHub will automatically suggest the "Jekyll" workflow. Click Configure and commit that .github/workflows/jekyll.yml file to your repo.
That's it. Now, every time you push a commit, the action will build the site, the plugin will read the Git logs, and the exact date that specific file was last touched will automatically appear in the footer.
Want to tackle the navigation sidebar next, or do you have other structural changes in mind for the site?
Activity