-
Notifications
You must be signed in to change notification settings - Fork 112
Description
THIS IS AN AWESOME PROJECT THANK YOU.
Opening an issue because the first page I found was this:
https://python-reference.readthedocs.io/en/latest/docs/brackets/slicing.html
A few suggestions to give this Doc have a better flow.
Problems:
- The breadcrumbs do not allow you to navigate up to the parent section.
- The Sidebar TOC has no highlighted entry on this page, which was disorienting for me. This was the first page of this documentation I encountered (arrived via a Google search).
From the index page (https://python-reference.readthedocs.io/en/latest/index.html)
you cannot ctrl+f to search and find "[]" nor "slicing",
since the [] (slicing) page is a child of Container Data Access -> [subsection] Brackets Operators.
So the unfamiliar user needs to explore or sift to find the position of the [] (slicing) page in the greater context.
More Details:
Breadcrumbs:
In the sphinx_rtd_theme, breadcrumbs are the area at the top of the main page block in the upper-left corner (in the same row as the "Edit on GitHub" link).
The breadcrumbs for the [] (slicing) page read:
Docs » [] (slicing)
Instead, the breadcrumbs for this page should ideally contain:
Docs » Container Data Access » [] (slicing)
TOC Entry:
There is no Sidebar TOC item selected on this page.
Ideally Container Data Access should be selected as the active Sidebar TOC listview item, and [] (slicing) should be a subnode / subsection item under Container Data Access.
Solution:
Both of these can be implemented in one go:
Currently the /docs/brackets/index.rst page contains hardcoded links to its children sections.
If you replace these hardcoded section label links with with a TOC Tree Directive inside the page /docs/brackets/index.rst like this:
.. toctree::
:maxdepth: -1
brackets/indexing.rst
brackets/slicing.rst
brackets/key_lookup.rst
brackets/ellipsis.rst
Then:
- When
/docs/brackets/index.rstis included in the.. toctree::of/index.rst, it's children will auto-populate inside the main index homepage TOC, andsphinx_rtd_themewill ALSO auto add these entries to the Sidebar TOC. (You do not need to modify/index.rstfor this implementation, only modify/docs/brackets/index.rst.) - (and I believe
sphinx_rtd_themewill auto-generate the breadcrumbs for you too).
Note: The syntax might work as-is in my codeblock example, but I didn't test it. My syntax might be off / I might have gotten the link paths wrong.
Short on time, but this is the general technique / recipe.
Thanks for this!
Again, this is an awesome project.
Cramming Python right now, awesome resource, many thanks!