Skip to content
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

Merged
merged 2 commits into from
Mar 20, 2017
Merged

add captions to the split toctrees #3466

merged 2 commits into from
Mar 20, 2017

Conversation

anarcat
Copy link
Contributor

@anarcat anarcat commented Mar 20, 2017

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.

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.

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
@mention-bot
Copy link

@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.

@alex
Copy link
Member

alex commented Mar 20, 2017

Jenkins, ok to test

docs/index.rst Outdated
.. toctree::
:maxdepth: 2
:caption: The ``cryptography`` open source project
Copy link
Member

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?

Copy link
Member

@alex alex left a 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.
@anarcat
Copy link
Contributor Author

anarcat commented Mar 20, 2017

@alex alright, done! i must admit i didn't test this explicitly...

@alex alex merged commit fd2b27a into pyca:master Mar 20, 2017
@anarcat anarcat deleted the patch-1 branch March 20, 2017 22:27
@anarcat
Copy link
Contributor Author

anarcat commented Mar 20, 2017

thanks!

@alex
Copy link
Member

alex commented Mar 20, 2017

Thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants