📝 docs: raise myst_heading_anchors to 4 for H4 deep-links#776
Merged
nstarman merged 1 commit intoJul 23, 2026
Merged
Conversation
PR GalacticDynamics#774 demoted several guide headings to H4 (e.g. "Creating Angles", "Natural unit systems", "Simple Dimension Names"). With myst_heading_anchors = 3, H4 headings get no auto-generated anchor and are therefore not deep-linkable. Bump the depth to 4 so these headings remain addressable. No content is deeper than H4, so 4 is sufficient. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Sphinx/MyST configuration so that H4 (####) headings in the documentation receive auto-generated anchors, restoring deep-linkability after prior heading demotions (per the follow-up context to #774).
Changes:
- Increase
myst_heading_anchorsfrom3to4indocs/conf.pyso H4 headings get anchors.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #776 +/- ##
==========================================
+ Coverage 91.73% 96.51% +4.77%
==========================================
Files 82 43 -39
Lines 3689 2465 -1224
Branches 304 145 -159
==========================================
- Hits 3384 2379 -1005
+ Misses 228 54 -174
+ Partials 77 32 -45 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
Followup to #774. That PR demoted several guide headings to H4 to fix double-H1 structure. With
myst_heading_anchors = 3indocs/conf.py, H4 headings receive no auto-generated anchor and are therefore not deep-linkable.This bumps the setting to
4so the demoted headings remain addressable:docs/guides/quantity.md— "Creating Angles", "Mathematical Operations", "Enforced Dimensionality", "Wrapping Angles", "Equality returns a scalarbool", "Equality vs. equivalence", "UsingQuantity(StaticValue)as ajax.jitstatic argument"docs/guides/units_and_systems.md— "Natural unit systems"docs/guides/dimensions.md— "Simple Dimension Names", "Mathematical Expressions", "Whitespace Handling"No headings are deeper than H4, so
4is sufficient.Context
Nothing currently links to these anchors, so this is not fixing a broken link — it restores deep-link addressability that the #774 heading demotions would otherwise have quietly removed. Surfaced during code review of #774.
🤖 Generated with Claude Code