Restore the visible last-updated date in the docs footer - #16
Merged
Conversation
PR #15 was merged without these two lines: the custom footer.html overrides the RTD theme footer and had dropped the theme's last-updated paragraph, and html_last_updated_fmt was missing so Sphinx never supplied the value. - footer.html: re-add the "Last updated on {{ last_updated }}" block - conf.py: html_last_updated_fmt = '%Y-%m-%d' Note: Sphinx computes last_updated once per build from the current time, not per source file, so every page shows the date of the last deploy. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #15 landed without the last-updated date. Two lines were missing:
docs/source/_templates/footer.html— the custom footer overrides the RTD theme footer, and had dropped the theme's last-updated paragraphdocs/source/conf.py—html_last_updated_fmt = '%Y-%m-%d', without which Sphinx never supplieslast_updatedat allBoth are needed: the config alone does nothing while the custom template omits the block, and the template alone renders nothing while the value is undefined.
Verify after the Pages deploy
Known limitation
Sphinx computes
last_updatedonce per build from the current time (format_date()inprepare_writing, stored inglobalcontext), not per source file. Since CI rebuilds the whole site on every push tomain, every page will show the date of the most recent deploy rather than its own content date. If per-page accuracy is wanted later,sphinx-last-updated-by-gitreads each file's real commit date.🤖 Generated with Claude Code