Skip to content

docs: fix changelog page heading levels and sidebar - #1171

Merged
henryiii merged 1 commit into
pypa:mainfrom
henryiii:docs/changelog-toc
Aug 30, 2026
Merged

docs: fix changelog page heading levels and sidebar#1171
henryiii merged 1 commit into
pypa:mainfrom
henryiii:docs/changelog-toc

Conversation

@henryiii

@henryiii henryiii commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Description

Fix up the display of the changelog; now just a normal entry, the ToC is now nested properly (first entry was raised a level before due to docstrfmt rewriting it).

Changelog

None needed.

  • Added changelog fragment: docs/changelog/<pr_number>.<type>.rst
    • Types: feature, bugfix, doc, removal, misc
    • Example: 123.feature.rst containing Add custom backend support - by :user:`yourname`

Checklist

  • Tests pass locally (tox)
  • Code follows project style (tox -e fix)
  • Type checks pass (tox -e type)
  • Documentation builds (tox -e docs)

@henryiii
henryiii force-pushed the docs/changelog-toc branch from cf16a97 to 941cd03 Compare August 29, 2026 19:50
Give the changelog page its own title so version headings become
sections: the current version now appears in the page ToC at the same
level as older versions. Fold the changelog link into the Development
sidebar section and use :titlesonly: to keep version headings out of
the sidebar. Exclude docs/changelog.rst from docstrfmt, which rewrote
the title to the same level as the included CHANGELOG.rst headings.

Assisted-by: ClaudeCode:claude-fable-5
Claude-Session: https://claude.ai/code/session_018JS2hRNjfymjCZez1jvGVV
@henryiii
henryiii force-pushed the docs/changelog-toc branch from 941cd03 to dcf2dd7 Compare August 30, 2026 03:54
@henryiii
henryiii marked this pull request as ready for review August 30, 2026 03:58
Comment thread .pre-commit-config.yaml
- id: docstrfmt
args: ["-l", "120"]
additional_dependencies: ["sphinx>=9.1"]
# title must outrank the included CHANGELOG.rst headings

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.

We're relying on this to reformat the changelog fragments. Is this the right approach to give up on that?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is not where the changelog fragments go. It’s a nearly empty file that includes the one without a title.

@henryiii
henryiii merged commit 59ad2a4 into pypa:main Aug 30, 2026
10 checks passed
@henryiii
henryiii deleted the docs/changelog-toc branch August 30, 2026 13:04
henryiii added a commit that referenced this pull request Sep 9, 2026
## Description

Fix up the display of the changelog; now just a normal entry, the ToC is
now nested properly (first entry was raised a level before due to
docstrfmt rewriting it).

<!-- Describe what changes you made and why -->

## Changelog

<!-- All PRs should include a changelog fragment in docs/changelog/ -->

None needed.

- [ ] Added changelog fragment: `docs/changelog/<pr_number>.<type>.rst`
  - Types: `feature`, `bugfix`, `doc`, `removal`, `misc`
- Example: `123.feature.rst` containing `` Add custom backend support -
by :user:`yourname` ``

## Checklist

- [ ] Tests pass locally (`tox`)
- [ ] Code follows project style (`tox -e fix`)
- [ ] Type checks pass (`tox -e type`)
- [x] Documentation builds (`tox -e docs`)
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.

3 participants