Skip to content

Fix docs pages listing their sections as separate pages in the sidebar - #75478

Merged
kaxil merged 1 commit into
apache:mainfrom
astronomer:fix-docs-multiple-top-level-titles
Oct 23, 2026
Merged

kaxil merged 1 commit into
apache:mainfrom
astronomer:fix-docs-multiple-top-level-titles

Conversation

@kaxil

@kaxil kaxil commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Eight docs pages had a second (or third) section underlined like the page title. RST reads those as extra top-level titles, and Sphinx lists each one in the sidebar as if it were its own page. In How-to Guides, for example, "Configuring local settings", "Using Notifiers", "Support for Airflow 2 plugins" and "Adding Dashboard Alert Messages" appear as separate pages. This is the same problem #75468 fixed for the upgrade guide, and sphinx-airflow-theme 0.3.15 (#75471) cannot hide it: its pages-only sidebar still shows every top-level title of a page.

Each extra title moves down one level, and every heading under it moves down one level too, so the structure inside each section is unchanged. Only underline characters change, so existing :ref: labels and anchors keep working.

Page Titles that showed as separate pages
howto/set-config.rst Configuring local settings
howto/notifications.rst Using Notifiers
howto/custom-view-plugin.rst Developing React Applications with the Bootstrap Tool; Support for Airflow 2 plugins
howto/customize-ui.rst Adding Dashboard Alert Messages
howto/create-custom-decorator.rst (Optional) Adding IDE auto-completion support
core-concepts/debug.rst Debugging Airflow Dags on the command line
administration-and-deployment/dagfile-processing.rst Fine-tuning your Dag processor performance
administration-and-deployment/logging-monitoring/metrics.rst Metric Descriptions

Sidebar from local breeze docs builds with sphinx-airflow-theme 0.3.15. The highlighted entries in "Before" are section titles shown as pages:

Before After
How-to Guides before How-to Guides after
Administration before Administration after

Why metrics_registry.py changes. metrics.rst includes metric_tables.rst, which is generated at build time, and an included file shares the parent page's heading levels. Its "Counters", "Gauges" and "Timers" headings used -, the level "Metric Descriptions" now takes, so they would have become its siblings. The generator now writes them with ^, which keeps them nested under "Metric Descriptions".

I found the pages by parsing every .rst under airflow-core/docs with docutils and counting top-level sections. index.rst still has several, which is fine: it is the root page, so its sections never appear as sidebar entries.

Eight pages underlined a later section like the page title, so Sphinx
treated it as another top-level title and listed it in the sidebar as
its own page. Demote each extra title and its subsections one level.

metric_tables.rst is included under Metric Descriptions and shares its
heading levels, so the generator now writes its headings one level
deeper to stay nested.
@kaxil
kaxil merged commit b7dfaf6 into apache:main Oct 23, 2026
61 of 62 checks passed
@kaxil
kaxil deleted the fix-docs-multiple-top-level-titles branch October 23, 2026 14:24
@github-actions github-actions Bot added this to the Airflow 3.4.1 milestone Oct 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to Airflow 3.4.1 based on: backport label targeting v3-4-test
If this milestone is not correct, please update it to the appropriate milestone.

This comment was generated by Milestone Tag Assistant.

@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-4-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
✅ v3-4-test PR Link

@kaxil kaxil modified the milestones: Airflow 3.4.1, Airflow 3.4.0 Oct 23, 2026
kaxil added a commit that referenced this pull request Oct 23, 2026
…n the sidebar (#75478) (#75481)

Eight pages underlined a later section like the page title, so Sphinx
treated it as another top-level title and listed it in the sidebar as
its own page. Demote each extra title and its subsections one level.

metric_tables.rst is included under Metric Descriptions and shares its
heading levels, so the generator now writes its headings one level
deeper to stay nested.
(cherry picked from commit b7dfaf6)

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants