Skip to content

Restore the visible last-updated date in the docs footer - #16

Merged
embarquech merged 1 commit into
mainfrom
feature/docs-last-updated-date
Aug 11, 2026
Merged

Restore the visible last-updated date in the docs footer#16
embarquech merged 1 commit into
mainfrom
feature/docs-last-updated-date

Conversation

@embarquech

Copy link
Copy Markdown
Contributor

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 paragraph
  • docs/source/conf.pyhtml_last_updated_fmt = '%Y-%m-%d', without which Sphinx never supplies last_updated at all

Both 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

curl -s https://docs.cryptnox.com/ | grep -o "Last updated on [0-9-]*"

Known limitation

Sphinx computes last_updated once per build from the current time (format_date() in prepare_writing, stored in globalcontext), not per source file. Since CI rebuilds the whole site on every push to main, 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-git reads each file's real commit date.

🤖 Generated with Claude Code

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>
@embarquech
embarquech merged commit a5b8341 into main Aug 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant