Skip to content

Add HTTP resources to TOC#80

Merged
stevepiercy merged 4 commits intosphinx-contrib:mainfrom
sevdog:toc
Jan 29, 2026
Merged

Add HTTP resources to TOC#80
stevepiercy merged 4 commits intosphinx-contrib:mainfrom
sevdog:toc

Conversation

@sevdog
Copy link
Contributor

@sevdog sevdog commented Sep 12, 2024

This PR adds the methods to handle TOC (table of content) generation which can be used by themes like furo to build a page-level-toc.

This can simplify nagivation in pages when there are many HTTP endpoints.

@stevepiercy
Copy link
Collaborator

@sevdog does this generate the right-hand "On this page" navigation, such as this in Furo?

Screenshot 2026-01-14 at 12 59 25 AM

If so, how is that different from the current implementation at https://sphinxcontrib-httpdomain.readthedocs.io/en/stable/index.html?

To merge this PR, it needs the following:

  • rebase on main
  • change log entry into doc/changelog.rst
  • documentation in doc/index.rst about what this does or supports differently than the current implementation

Please let me know. Thank you!

@read-the-docs-community
Copy link

read-the-docs-community bot commented Jan 29, 2026

Documentation build overview

📚 sphinxcontrib-httpdomain | 🛠️ Build #31194038 | 📁 Comparing ba685ee against latest (8fcfb8e)


🔍 Preview build

Show files changed (1 files in total): 📝 1 modified | ➕ 0 added | ➖ 0 deleted
File Status
index.html 📝 modified

@sevdog
Copy link
Contributor Author

sevdog commented Jan 29, 2026

Hi @stevepiercy, you are right that is what I am achieving to get, to show also endpoints in the TOC. Because without implementing those methods sphinx will not put them in the TOC (and by default the returns empty elements).

I have updated the PR and the code by also adding a specific flag to turn on this change.

Copy link
Collaborator

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

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

This is a very nice and useful improvement. Thank you! I expanded the wording in the documentation and change log. Would you please take a look and let me know or just accept the suggestions?

@sevdog
Copy link
Contributor Author

sevdog commented Jan 29, 2026

I just putted the changes with a single commit. I'm fine with the wording, thank you.

Copy link
Collaborator

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

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

Thank you! Will merge after CI passes. This will go into the a2 release. I'll try to get that out later today or tomorrow.

@stevepiercy stevepiercy merged commit b1c37d5 into sphinx-contrib:main Jan 29, 2026
6 checks passed
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.

2 participants

Comments