Skip to content

📝 docs: raise myst_heading_anchors to 4 for H4 deep-links#776

Merged
nstarman merged 1 commit into
GalacticDynamics:mainfrom
nstarman:claude/docs-h4-anchor-depth
Jul 23, 2026
Merged

📝 docs: raise myst_heading_anchors to 4 for H4 deep-links#776
nstarman merged 1 commit into
GalacticDynamics:mainfrom
nstarman:claude/docs-h4-anchor-depth

Conversation

@nstarman

Copy link
Copy Markdown
Contributor

Summary

Followup to #774. That PR demoted several guide headings to H4 to fix double-H1 structure. With myst_heading_anchors = 3 in docs/conf.py, H4 headings receive no auto-generated anchor and are therefore not deep-linkable.

This bumps the setting to 4 so the demoted headings remain addressable:

  • docs/guides/quantity.md — "Creating Angles", "Mathematical Operations", "Enforced Dimensionality", "Wrapping Angles", "Equality returns a scalar bool", "Equality vs. equivalence", "Using Quantity(StaticValue) as a jax.jit static 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 4 is 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

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>
Copilot AI review requested due to automatic review settings July 23, 2026 13:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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_anchors from 3 to 4 in docs/conf.py so H4 headings get anchors.

@github-actions github-actions Bot added the 📝 Add / update documentation Add or update documentation. label Jul 23, 2026
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.51%. Comparing base (68cb7bb) to head (32596a1).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nstarman nstarman added this to the v2.0.0 milestone Jul 23, 2026
@nstarman
nstarman merged commit 84915e2 into GalacticDynamics:main Jul 23, 2026
37 checks passed
@nstarman
nstarman deleted the claude/docs-h4-anchor-depth branch July 23, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📝 Add / update documentation Add or update documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants