-
Notifications
You must be signed in to change notification settings - Fork 0
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
Discussing and shaping the linktree
directive
#14
Comments
Hi again. We did not go into that rabbit hole yet, but @bintoro apparently did on behalf of sphinx-navtree. Thank you so much. 🍀 Abstract
Problem DescriptionThe Read the Docs theme supports optional top-level headings that divide a documentation into its main sections (Manual and Demo Section in this documentation). They show up in the navigation pane and are rendered in all caps. This works fine for the navigation menu. The trouble is that the captioned toctrees only appear to divide the content into top-level parts. Structurally, the layout in the example simply translates to consecutive chapters at the root level. This is because parallel toctrees do not establish separate branches in the Sphinx document tree: The captions are really only annotations that have no bearing on the structure. Now having learned that the captions are only visual dividers, and are not reflected in the actual document hierarchy, it becomes clear they will not appear anywhere outside of the navigation menu. Main sections defined in this way will not show up in PDF or EPUB outputs, the HTML breadcrumb navigation, or other representations of the full content layout. Solutionsphinx-navtree solves the problem by letting you define the top-level structure as a proper hierarchy and converting that structure into captioned lists for nav tree rendering purposes only. This way, you make full use of the theme while ensuring the documentation is well-structured and renders correctly in all output formats. When a template requests the global navigation tree, sphinx-navtree transforms it into one with captioned lists before it is rendered into HTML. Essentially, the entire hierarchy is shifted up one level, with the two topmost levels merged into one. The end result is as if the structure had been specified like in the initial example — but only HTML navigation is affected. In other contexts the structure will be represented in full. -- Source: https://sphinx-navtree.readthedocs.io/en/latest/transforms.html |
Hi there,
Introduction
Over at GH-11, we started to work 1 on a
linktree
directive, somehow extending the capabilities of the venerabletoctree
directive, somehow going into different directions. This issue can be used to discuss this feature independently, and beyond the lifetime of the pull request.We are looking forward to any kind of feedback or praise. Right now will be a good chance that your input can find a good chance to be considered on the next development iterations.
Preview
https://sphinx-design-elements--11.org.readthedocs.build/en/11/linktree.html
Credits
Last but not least, we would like send huge kudos to @pradyunsg for conceiving and maintaining the Furo theme, where the web representation of the "Link Tree" derives its machinery from. 💯
With kind regards,
Andreas.
References » Issues
toctree
function provided to HTML theme templates sphinx-doc/sphinx#10697References » PRs
title <hyperlink>
_ toctree entries sphinx-doc/sphinx#1800Footnotes
Please note it is heavily work-in-progress, and its API or implementation may change before the initial release. ↩
The text was updated successfully, but these errors were encountered: