-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Update docs to use NVIDIA Sphinx theme #23035
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e0bc08d
Update docs to use NVIDIA Sphinx theme
bdice 2383347
Update docs/cudf/source/cudf/developer_guide/documentation.md
bdice d7de68d
Fix cudf-streaming build with GCC 14
bdice a1db69a
Use top primary docs navigation
bdice 8562758
Start docs sidebar below top nav
bdice 2954b25
Preserve foldable docs sidebar sections
bdice cd80f49
Use default docs sidebar navigation
bdice 1c6b8e5
Start docs sidebar below primary nav
bdice 9d8813f
Merge remote-tracking branch 'upstream/main' into codex/nvidia-docs-t…
bdice 46db3ef
Document docs sidebar override
bdice File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| {# | ||
| Override PyData Sphinx Theme's sidebar-nav-bs.html component. | ||
|
|
||
| NVIDIA Sphinx Theme inherits PyData's default primary sidebar configuration, | ||
| which includes this component by template name. Placing a file with the same | ||
| name in the project's _templates directory makes Sphinx use this version. | ||
|
|
||
| PyData's generate_toctree_html("sidebar", startdepth=1, ...) returns the | ||
| normal sidebar tree rooted at the currently active top-level toctree item. | ||
| That is correct for nested pages such as cudf/api_docs/index, where the | ||
| sidebar should still show the active API reference node and its foldable | ||
| children. For top-level section landing pages such as cudf_pandas/index, | ||
| that output duplicates the primary navbar item in the sidebar, so we render | ||
| only the active section's child <ul> on those landing pages. | ||
| #} | ||
| {% set show_nav_level = meta['html_theme.show_nav_level'] if (meta is defined and meta is not none and 'html_theme.show_nav_level' in meta) else theme_show_nav_level %} | ||
| {% set special_page = pagename == root_doc or pagename in ["genindex", "py-modindex", "search"] %} | ||
| {% if not special_page %} | ||
| {% set nav_tree = generate_toctree_html( | ||
| "sidebar", | ||
| startdepth=1, | ||
| show_nav_level=show_nav_level | int, | ||
| maxdepth=theme_navigation_depth | int, | ||
| collapse=theme_collapse_navigation | tobool, | ||
| includehidden=theme_sidebar_includehidden | tobool, | ||
| titles_only=True, | ||
| ) %} | ||
| {% set pagename_parts = pagename.split("/") %} | ||
| {% set top_section_page = pagename_parts | length == 2 and pagename_parts[-1] == "index" %} | ||
| {% if top_section_page %} | ||
| {% set active_section = nav_tree.select_one("li.toctree-l1.current") %} | ||
| {% set active_details = active_section.find("details", recursive=False) if active_section else none %} | ||
| {% set section_nav = active_details.find("ul", recursive=False) if active_details else nav_tree %} | ||
| {% else %} | ||
| {% set section_nav = nav_tree %} | ||
| {% endif %} | ||
| <nav class="bd-docs-nav bd-links" | ||
| aria-label="{{ _('Section Navigation') }}"> | ||
| <p class="bd-links__title" role="heading" aria-level="1">{{ _("Section Navigation") }}</p> | ||
| <div class="bd-toc-item navbar-nav"> | ||
| {{ section_nav }} | ||
| </div> | ||
| </nav> | ||
| {% endif %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
bdice marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../../cudf/source/_templates/sidebar-nav-bs.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.