← 输入框|github.com|刷新
Skip to content

Compute docs content date by diffs - #3545

Open
C-Achard wants to merge 3 commits into
cy/docs-toc-orphan-checkfrom
cy/docs-content-date-from-diff
Open

C-Achard wants to merge 3 commits into
cy/docs-toc-orphan-checkfrom
cy/docs-content-date-from-diff

Conversation

@C-Achard

@C-Achard C-Achard commented Oct 6, 2026

Copy link
Copy Markdown
Member

Motivation

Main changes

  • A commit counts when the file renders differently before and after it; commit messages are not read.
  • Markdown is compared as HTML rendered by markdown-it-py (Jupyter Book's parser), whitespace collapsed; frontmatter is ignored.
  • Notebooks: only cell types and sources count; Markdown cells are rendered the same way, code cells compared by Python syntax tree.

Stack created with GitHub Stacks CLI • Give Feedback 💬

@C-Achard
C-Achard added this pull request to stack #3539 October 6, 2026 14:34
@C-Achard C-Achard added enhancement New feature or request documentation documentation updates/comments labels Oct 6, 2026
@C-Achard C-Achard self-assigned this Oct 6, 2026
@C-Achard C-Achard added enhancement New feature or request documentation documentation updates/comments labels Oct 6, 2026
@C-Achard C-Achard added the 3.1 label Oct 23, 2026
@C-Achard
C-Achard removed this pull request from stack #3539 November 18, 2026 09:08
@C-Achard
C-Achard force-pushed the cy/docs-content-date-from-diff branch from d347aaf to b2c88a1 Compare November 18, 2026 09:08
@C-Achard
C-Achard changed the base branch from cy/additional-docs-fixes to cy/docs-toc-orphan-check November 18, 2026 09:09
@C-Achard
C-Achard added this pull request to stack #3594 November 18, 2026 09:09
@C-Achard C-Achard added 3.0.4 and removed 3.1 labels Nov 26, 2026
@C-Achard
C-Achard force-pushed the cy/docs-content-date-from-diff branch from b2c88a1 to f856b28 Compare November 26, 2026 12:52
@C-Achard
C-Achard requested a review from deruyter92 November 26, 2026 12:53

@deruyter92 deruyter92 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good improvement.

Note that this will cause many non-content changes (e.g. our linting efforts in March) also to appear as diff. So in practice, some documentation content may be way older than metadata suggests. But that is fine IMO, for a fine-grained inspection we can always look at the full git history if needed.

@C-Achard

C-Achard commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

@deruyter92 That is also the purpose of last_verified_for, since indeed edits may be linting. It's really meant as a human seal of approval that should reflect whether something is up to date, vs recently modified.

@C-Achard
C-Achard marked this pull request as ready for review December 4, 2026 09:20
Compute last_content_updated from actual Markdown body or notebook cell-source diffs instead of commit-message markers. This removes the required --ack-meta-commit-marker guardrail, treats metadata-only and normalization changes as ignorable, and updates the README and regression tests to match the new behavior.
Make `last_content_updated` treat Markdown and notebook reformatting as non-content changes. Markdown is now compared by rendered HTML, notebook Markdown cells use the same normalization, and code cells are compared by Python AST so formatting and comments do not affect staleness dates. The change also adds the `markdown-it-py` dependency, updates docs, and covers the new behavior with contract tests.
@C-Achard
C-Achard force-pushed the cy/docs-content-date-from-diff branch from f856b28 to 6567f9b Compare December 4, 2026 09:23

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.0.4 documentation documentation updates/comments enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants