-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add captions to the split toctrees #3466
Conversation
this will render the table of contents with separators in the RTD theme. right now, the table of contents is quite confusing on the [RTD site][] - that is because there are 3 distinct `toctree` directives, but no `:caption:` field. instead, there are headers in the `index.rst` but those are not parsed by RTD. [RTD site]: https://cryptography.io/en/latest/ by moving those headers in the `:caption:` field, we keep the heading, but it will also be shown in the left table of contents on the RTD site. for an example of that pattern, see the [scrapy documentation][]. they go even further by hiding the `toctree` elements completely and adding explanations on every section, but this is out of scope here for now. [scrapy documentation]: https://doc.scrapy.org/en/latest/index.html
|
@anarcat, thanks for your PR! By analyzing the history of the files in this pull request, we identified @alex, @skeuomorf and @reaperhulk to be potential reviewers. |
|
Jenkins, ok to test |
docs/index.rst
Outdated
| .. toctree:: | ||
| :maxdepth: 2 | ||
| :caption: The ``cryptography`` open source project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backticks for monospace don't work in caption, can you remove tehm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides that comment, this looks great. Thanks for reporting it!
they do not work in that field, apparently.
|
@alex alright, done! i must admit i didn't test this explicitly... |
|
thanks! |
|
Thank you! |
this will render the table of contents with separators in the RTD
theme. right now, the table of contents is quite confusing on
the RTD site - that is because there are 3 distinct
toctreedirectives, but no
:caption:field. instead, there are headers inthe
index.rstbut those are not parsed by RTD.by moving those headers in the
:caption:field, we keep the heading,but it will also be shown in the left table of contents on the RTD
site.
for an example of that pattern, see the scrapy documentation. they
go even further by hiding the
toctreeelements completely and addingexplanations on every section, but this is out of scope here for now.