How to remove module and class prefix in TOC names? #692
-
I'm not sure if this is a Sphinx issue or a Furo issue, but I'll start here anyway. There are 2 things going on that I'd like help with:
I have tried setting |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
For 2, at least, I would check your (This might solve 1, too, but our docset is organized manually into pages, so auto-generated page titles based on the module name aren't used anywhere.) |
Beta Was this translation helpful? Give feedback.
-
Hi @dgw, Thank you! I was looking for hours yesterday, and setting It did not help with #1. The closest I could find was to go through each .rst file and remove the package/module parents from the title. For example, in edgeimpulse_api.api.admin_api.rst, I changed
to
That helped make some of the longer titles much easier to read on the left sidebar and on the page itself (see screenshot). My follow-up question: is there any way to change the title like this automatically (either in sphinx-apidoc or sphinx-build) without needing to manually edit every .rst file? My search has not turned up anything, and my backup plan is to create a pre-processing script that runs between sphinx-apidoc and sphinx-build that modifies the titles in all .rst files (not pretty, so I'm hoping to avoid this option). |
Beta Was this translation helpful? Give feedback.
For 2, at least, I would check your
toc_object_entries_show_parents
setting inconf.py
. With the default value ("domain"), in a Python project, I'm not seeing excessive prefixes in Furo's right sidebar.(This might solve 1, too, but our docset is organized manually into pages, so auto-generated page titles based on the module name aren't used anywhere.)