Skip to content

docs: show when each page last changed - #347

Merged
EivMeyer merged 1 commit into
mainfrom
docs/last-updated
Oct 10, 2026
Merged

EivMeyer merged 1 commit into
mainfrom
docs/last-updated

Conversation

@EivMeyer

Copy link
Copy Markdown
Contributor

Summary

Every guide page now ends with "Last updated" and a date, so readers can tell how current it is. The date is the last commit that changed that page's source. The Zeroshot docs get the same line in the-open-engine/zeroshot#1224.

Details

  • scripts/build-docs.py reads the date from Git and appends the line to each page before rendering.
  • The CLI reference has no source file of its own; it is dated by src/cli_args.rs, which it is generated from. Rustdoc pages and directory listings are not dated.
  • A shallow clone credits every file to its one visible commit, so a build without full history shows no date instead of a wrong one. docs.yml now fetches full history for the source checkout; the pull-request build is shallow and shows none.
  • As with any docs change, this reaches dev on merge and stable with the next release.

Verification

  • scripts/build-docs.sh on a full checkout: 61 guide pages carry a date, each its own (overview 4 October, getting started 24 September, CLI 22 September)
  • New test in test_docs_versions.py: the newest commit touching a file wins, and an untracked file, a shallow clone and a directory outside Git give no line. 24 pass.
  • opcore check against main: clean. opcore run pre-commit: Verify clean, no Sense findings; it still exits requires_attention on the repository's partial Sense coverage, as on main.
  • The changed workflow file parses, with fetch-depth: 0 on the source checkout

🤖 Generated with Claude Code

Readers could not tell how current a page was. Each guide now ends with
"Last updated" and the date of the last commit that changed its source.
The CLI reference is dated by the argument definitions it is generated
from. Rustdoc pages are not dated.

A shallow clone credits every file to its one visible commit, so a
build without full history shows no date rather than a wrong one. The
publish workflow now fetches full history for the source checkout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@EivMeyer
EivMeyer merged commit 36547a6 into main Oct 10, 2026
16 checks passed
@EivMeyer
EivMeyer deleted the docs/last-updated branch October 10, 2026 20:06
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