From e0bc08d6fdcdece43261aa396efc7d9cb9104d96 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Mon, 29 Jun 2026 16:01:58 -0500 Subject: [PATCH 1/9] Update docs to use NVIDIA Sphinx theme --- conda/environments/all_cuda-129_arch-aarch64.yaml | 3 ++- conda/environments/all_cuda-129_arch-x86_64.yaml | 3 ++- conda/environments/all_cuda-133_arch-aarch64.yaml | 3 ++- conda/environments/all_cuda-133_arch-x86_64.yaml | 3 ++- cpp/doxygen/header.html | 4 ---- dependencies.yaml | 10 ++-------- docs/cudf/source/conf.py | 10 ++-------- .../source/cudf/developer_guide/documentation.md | 2 +- docs/dask_cudf/source/conf.py | 14 +++----------- 9 files changed, 16 insertions(+), 36 deletions(-) diff --git a/conda/environments/all_cuda-129_arch-aarch64.yaml b/conda/environments/all_cuda-129_arch-aarch64.yaml index 71bd3873d456..64d049f0005f 100644 --- a/conda/environments/all_cuda-129_arch-aarch64.yaml +++ b/conda/environments/all_cuda-129_arch-aarch64.yaml @@ -77,7 +77,6 @@ dependencies: - polars>=1.35,<1.42 - pre-commit - pyarrow>=19.0.0,<24 -- pydata-sphinx-theme>=0.15.4 - pytables - pytest-benchmark - pytest-cases>=3.8.2 @@ -118,4 +117,6 @@ dependencies: - xlsxwriter - zlib>=1.2.13 - zstandard +- pip: + - nvidia-sphinx-theme name: all_cuda-129_arch-aarch64 diff --git a/conda/environments/all_cuda-129_arch-x86_64.yaml b/conda/environments/all_cuda-129_arch-x86_64.yaml index 5bf990d78f91..2ac4a7125801 100644 --- a/conda/environments/all_cuda-129_arch-x86_64.yaml +++ b/conda/environments/all_cuda-129_arch-x86_64.yaml @@ -77,7 +77,6 @@ dependencies: - polars>=1.35,<1.42 - pre-commit - pyarrow>=19.0.0,<24 -- pydata-sphinx-theme>=0.15.4 - pytables - pytest-benchmark - pytest-cases>=3.8.2 @@ -118,4 +117,6 @@ dependencies: - xlsxwriter - zlib>=1.2.13 - zstandard +- pip: + - nvidia-sphinx-theme name: all_cuda-129_arch-x86_64 diff --git a/conda/environments/all_cuda-133_arch-aarch64.yaml b/conda/environments/all_cuda-133_arch-aarch64.yaml index ae7839c8303d..02f8cd6c6bc1 100644 --- a/conda/environments/all_cuda-133_arch-aarch64.yaml +++ b/conda/environments/all_cuda-133_arch-aarch64.yaml @@ -77,7 +77,6 @@ dependencies: - polars>=1.35,<1.42 - pre-commit - pyarrow>=19.0.0,<24 -- pydata-sphinx-theme>=0.15.4 - pytables - pytest-benchmark - pytest-cases>=3.8.2 @@ -118,4 +117,6 @@ dependencies: - xlsxwriter - zlib>=1.2.13 - zstandard +- pip: + - nvidia-sphinx-theme name: all_cuda-133_arch-aarch64 diff --git a/conda/environments/all_cuda-133_arch-x86_64.yaml b/conda/environments/all_cuda-133_arch-x86_64.yaml index 5ae487fb98d8..bdb6e7f60624 100644 --- a/conda/environments/all_cuda-133_arch-x86_64.yaml +++ b/conda/environments/all_cuda-133_arch-x86_64.yaml @@ -77,7 +77,6 @@ dependencies: - polars>=1.35,<1.42 - pre-commit - pyarrow>=19.0.0,<24 -- pydata-sphinx-theme>=0.15.4 - pytables - pytest-benchmark - pytest-cases>=3.8.2 @@ -118,4 +117,6 @@ dependencies: - xlsxwriter - zlib>=1.2.13 - zstandard +- pip: + - nvidia-sphinx-theme name: all_cuda-133_arch-x86_64 diff --git a/cpp/doxygen/header.html b/cpp/doxygen/header.html index 569b8450e3ab..8c076e6f11d6 100644 --- a/cpp/doxygen/header.html +++ b/cpp/doxygen/header.html @@ -17,10 +17,6 @@ $extrastylesheet - - - -
diff --git a/dependencies.yaml b/dependencies.yaml index bd99c363541a..cd95bfee5fb7 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -864,21 +864,15 @@ dependencies: - nbsphinx - numpydoc - pandoc - # Minimum version for safe parallel writing again. - # https://github.com/pydata/pydata-sphinx-theme/pull/1859 - # https://github.com/pydata/pydata-sphinx-theme/releases/tag/v0.15.4 - - pydata-sphinx-theme>=0.15.4 - scipy - # Needed for safe parallel writes as with the pydata-sphinx-theme pin above - # https://github.com/sphinx-doc/sphinx/issues/12409 - # https://github.com/sphinx-doc/sphinx/pull/12888 - # https://github.com/sphinx-doc/sphinx/releases/tag/v8.1.0 - sphinx>=8.1.0 - sphinx-autobuild - sphinx-copybutton - sphinx-markdown-tables - sphinx-remove-toctrees - sphinxcontrib-websupport + - pip: + - nvidia-sphinx-theme notebooks: common: - output_types: [conda, requirements] diff --git a/docs/cudf/source/conf.py b/docs/cudf/source/conf.py index 479371c6d435..06849facba04 100644 --- a/docs/cudf/source/conf.py +++ b/docs/cudf/source/conf.py @@ -179,7 +179,7 @@ def clean_all_xml_files(path): master_doc = "index" # General information about the project. -project = "cudf" +project = "cuDF" copyright = f"2018-{datetime.datetime.today().year}, NVIDIA Corporation" author = "NVIDIA Corporation" @@ -226,7 +226,6 @@ def clean_all_xml_files(path): html_theme_options = { "external_links": [], - # https://github.com/pydata/pydata-sphinx-theme/issues/1220 "icon_links": [], "github_url": "https://github.com/rapidsai/cudf", "twitter_url": "https://twitter.com/rapidsai", @@ -241,8 +240,7 @@ def clean_all_xml_files(path): # a list of builtin themes. # -html_theme = "pydata_sphinx_theme" -html_logo = "_static/RAPIDS-logo-purple.png" +html_theme = "nvidia_sphinx_theme" # Theme options are theme-specific and customize the look and feel of a theme @@ -780,10 +778,6 @@ def add_content(self, more_content) -> None: def setup(app): - app.add_css_file("https://docs.rapids.ai/assets/css/custom.css") - app.add_js_file( - "https://docs.rapids.ai/assets/js/custom.js", loading_method="defer" - ) app.connect("doctree-read", resolve_aliases) app.connect("missing-reference", on_missing_reference) app.setup_extension("sphinx.ext.autodoc") diff --git a/docs/cudf/source/cudf/developer_guide/documentation.md b/docs/cudf/source/cudf/developer_guide/documentation.md index d577c3932c54..1e9226400f80 100644 --- a/docs/cudf/source/cudf/developer_guide/documentation.md +++ b/docs/cudf/source/cudf/developer_guide/documentation.md @@ -95,7 +95,7 @@ Section name ``` Each listed will automatically have its docstring rendered into a separate page. -This layout comes from [PyData Sphinx Theme](https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html). +This layout comes from [NVIDIA Sphinx Theme](https://nvidia-sphinx-theme.readthedocs.io/). ````{note} Autosummary generates stub pages that look like this (using `cudf.concat` as an example): diff --git a/docs/dask_cudf/source/conf.py b/docs/dask_cudf/source/conf.py index 1d66357e10cd..3e71aa6db02e 100644 --- a/docs/dask_cudf/source/conf.py +++ b/docs/dask_cudf/source/conf.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright (c) 2018-2026, NVIDIA CORPORATION. +# SPDX-FileCopyrightText: Copyright (c) 2018-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # Configuration file for the Sphinx documentation builder. @@ -16,7 +16,7 @@ DASK_CUDF_VERSION = Version(dask_cudf.__version__) -project = "dask-cudf" +project = "dask-cuDF" copyright = f"2018-{datetime.datetime.today().year}, NVIDIA Corporation" author = "NVIDIA Corporation" version = f"{DASK_CUDF_VERSION.major:02}.{DASK_CUDF_VERSION.minor:02}" @@ -50,8 +50,7 @@ # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output -html_theme = "pydata_sphinx_theme" -html_logo = "_static/RAPIDS-logo-purple.png" +html_theme = "nvidia_sphinx_theme" htmlhelp_basename = "dask-cudfdoc" html_use_modindex = True @@ -86,10 +85,3 @@ numpydoc_attributes_as_param_list = False nitpicky = True - - -def setup(app): - app.add_css_file("https://docs.rapids.ai/assets/css/custom.css") - app.add_js_file( - "https://docs.rapids.ai/assets/js/custom.js", loading_method="defer" - ) From 23833478da9850b3d985136326ea287e370d2a97 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Mon, 29 Jun 2026 16:14:31 -0500 Subject: [PATCH 2/9] Update docs/cudf/source/cudf/developer_guide/documentation.md --- docs/cudf/source/cudf/developer_guide/documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cudf/source/cudf/developer_guide/documentation.md b/docs/cudf/source/cudf/developer_guide/documentation.md index 1e9226400f80..503baf44c7d9 100644 --- a/docs/cudf/source/cudf/developer_guide/documentation.md +++ b/docs/cudf/source/cudf/developer_guide/documentation.md @@ -95,7 +95,7 @@ Section name ``` Each listed will automatically have its docstring rendered into a separate page. -This layout comes from [NVIDIA Sphinx Theme](https://nvidia-sphinx-theme.readthedocs.io/). +This layout comes from [NVIDIA Sphinx Theme](https://pypi.org/project/nvidia-sphinx-theme/). ````{note} Autosummary generates stub pages that look like this (using `cudf.concat` as an example): From d7de68d25c03a0a8b14b96e2acdf1b43fae06ca6 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Mon, 29 Jun 2026 17:06:17 -0500 Subject: [PATCH 3/9] Fix cudf-streaming build with GCC 14 --- python/cudf_streaming/cudf_streaming/partition_utils.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cudf_streaming/cudf_streaming/partition_utils.pyx b/python/cudf_streaming/cudf_streaming/partition_utils.pyx index 5886169fd750..9e81e8737afd 100644 --- a/python/cudf_streaming/cudf_streaming/partition_utils.pyx +++ b/python/cudf_streaming/cudf_streaming/partition_utils.pyx @@ -321,7 +321,7 @@ cpdef object packed_data_from_cudf_packed_columns( cdef cpp_BufferResource* _br = br.ptr() cdef PackedData ret = PackedData.__new__(PackedData) with nogil: - if not (packed_columns.c_obj != NULL and + if not (packed_columns.c_obj.get() != NULL and deref(packed_columns.c_obj).metadata and deref(packed_columns.c_obj).gpu_data): raise ValueError("Cannot release empty PackedColumns") From a1db69a4e01ae363dac705b9efe62794f303dd61 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Mon, 29 Jun 2026 17:29:36 -0500 Subject: [PATCH 4/9] Use top primary docs navigation --- docs/cudf/source/conf.py | 1 + docs/dask_cudf/source/conf.py | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/cudf/source/conf.py b/docs/cudf/source/conf.py index 06849facba04..c2f4754a6b46 100644 --- a/docs/cudf/source/conf.py +++ b/docs/cudf/source/conf.py @@ -231,6 +231,7 @@ def clean_all_xml_files(path): "twitter_url": "https://twitter.com/rapidsai", "show_toc_level": 1, "navbar_align": "content", + "navbar_center": "navbar-nav, version-switcher, navbar-external-links", "navigation_with_keys": True, } include_pandas_compat = True diff --git a/docs/dask_cudf/source/conf.py b/docs/dask_cudf/source/conf.py index 3e71aa6db02e..93694b7f1ecc 100644 --- a/docs/dask_cudf/source/conf.py +++ b/docs/dask_cudf/source/conf.py @@ -64,6 +64,7 @@ "twitter_url": "https://twitter.com/rapidsai", "show_toc_level": 1, "navbar_align": "right", + "navbar_center": "navbar-nav, version-switcher, navbar-external-links", "navigation_with_keys": True, } include_pandas_compat = True From 85627589fc9aa6d7e4bc2e02190435634a28318e Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Mon, 29 Jun 2026 17:38:30 -0500 Subject: [PATCH 5/9] Start docs sidebar below top nav --- .../source/_templates/sidebar-nav-bs.html | 31 +++++++++++++++++++ .../source/_templates/sidebar-nav-bs.html | 31 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 docs/cudf/source/_templates/sidebar-nav-bs.html create mode 100644 docs/dask_cudf/source/_templates/sidebar-nav-bs.html diff --git a/docs/cudf/source/_templates/sidebar-nav-bs.html b/docs/cudf/source/_templates/sidebar-nav-bs.html new file mode 100644 index 000000000000..110e2c0c3fb1 --- /dev/null +++ b/docs/cudf/source/_templates/sidebar-nav-bs.html @@ -0,0 +1,31 @@ +{# Displays the TOC subtree below the currently active top-level navbar item. #} +{% 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 %} +{% if pagename == root_doc or pagename in ["genindex", "py-modindex", "search"] %} + {% set nav_tree = generate_toctree_html( + "raw", + startdepth=0, + 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, + ) %} +{% else %} + {% set nav_tree = generate_toctree_html( + "raw", + 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, + ) %} +{% endif %} +{% set active_children = nav_tree.select_one("ul > li.current > ul") %} + diff --git a/docs/dask_cudf/source/_templates/sidebar-nav-bs.html b/docs/dask_cudf/source/_templates/sidebar-nav-bs.html new file mode 100644 index 000000000000..110e2c0c3fb1 --- /dev/null +++ b/docs/dask_cudf/source/_templates/sidebar-nav-bs.html @@ -0,0 +1,31 @@ +{# Displays the TOC subtree below the currently active top-level navbar item. #} +{% 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 %} +{% if pagename == root_doc or pagename in ["genindex", "py-modindex", "search"] %} + {% set nav_tree = generate_toctree_html( + "raw", + startdepth=0, + 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, + ) %} +{% else %} + {% set nav_tree = generate_toctree_html( + "raw", + 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, + ) %} +{% endif %} +{% set active_children = nav_tree.select_one("ul > li.current > ul") %} + From 2954b25feba02eb09333fd7921c182aa3446e4d3 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Mon, 29 Jun 2026 17:54:09 -0500 Subject: [PATCH 6/9] Preserve foldable docs sidebar sections --- docs/cudf/source/_templates/sidebar-nav-bs.html | 15 +++++++++------ .../source/_templates/sidebar-nav-bs.html | 15 +++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/docs/cudf/source/_templates/sidebar-nav-bs.html b/docs/cudf/source/_templates/sidebar-nav-bs.html index 110e2c0c3fb1..ef294f0a8d19 100644 --- a/docs/cudf/source/_templates/sidebar-nav-bs.html +++ b/docs/cudf/source/_templates/sidebar-nav-bs.html @@ -1,8 +1,9 @@ -{# Displays the TOC subtree below the currently active top-level navbar item. #} +{# Displays navigation below the top-level navbar while preserving foldable sections. #} {% 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 %} -{% if pagename == root_doc or pagename in ["genindex", "py-modindex", "search"] %} +{% set special_page = pagename == root_doc or pagename in ["genindex", "py-modindex", "search"] %} +{% if special_page %} {% set nav_tree = generate_toctree_html( - "raw", + "sidebar", startdepth=0, show_nav_level=show_nav_level | int, maxdepth=theme_navigation_depth | int, @@ -12,7 +13,7 @@ ) %} {% else %} {% set nav_tree = generate_toctree_html( - "raw", + "sidebar", startdepth=1, show_nav_level=show_nav_level | int, maxdepth=theme_navigation_depth | int, @@ -20,12 +21,14 @@ includehidden=theme_sidebar_includehidden | tobool, titles_only=True, ) %} + {% set active_item = nav_tree.select_one("li.current") %} + {% set active_children = active_item.select_one("ul") if active_item else none %} + {% set nav_tree = active_children if active_children else nav_tree %} {% endif %} -{% set active_children = nav_tree.select_one("ul > li.current > ul") %} diff --git a/docs/dask_cudf/source/_templates/sidebar-nav-bs.html b/docs/dask_cudf/source/_templates/sidebar-nav-bs.html index 110e2c0c3fb1..ef294f0a8d19 100644 --- a/docs/dask_cudf/source/_templates/sidebar-nav-bs.html +++ b/docs/dask_cudf/source/_templates/sidebar-nav-bs.html @@ -1,8 +1,9 @@ -{# Displays the TOC subtree below the currently active top-level navbar item. #} +{# Displays navigation below the top-level navbar while preserving foldable sections. #} {% 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 %} -{% if pagename == root_doc or pagename in ["genindex", "py-modindex", "search"] %} +{% set special_page = pagename == root_doc or pagename in ["genindex", "py-modindex", "search"] %} +{% if special_page %} {% set nav_tree = generate_toctree_html( - "raw", + "sidebar", startdepth=0, show_nav_level=show_nav_level | int, maxdepth=theme_navigation_depth | int, @@ -12,7 +13,7 @@ ) %} {% else %} {% set nav_tree = generate_toctree_html( - "raw", + "sidebar", startdepth=1, show_nav_level=show_nav_level | int, maxdepth=theme_navigation_depth | int, @@ -20,12 +21,14 @@ includehidden=theme_sidebar_includehidden | tobool, titles_only=True, ) %} + {% set active_item = nav_tree.select_one("li.current") %} + {% set active_children = active_item.select_one("ul") if active_item else none %} + {% set nav_tree = active_children if active_children else nav_tree %} {% endif %} -{% set active_children = nav_tree.select_one("ul > li.current > ul") %} From cd80f498864d1b86db6a201fd372620112f292e2 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Mon, 29 Jun 2026 18:04:44 -0500 Subject: [PATCH 7/9] Use default docs sidebar navigation --- .../source/_templates/sidebar-nav-bs.html | 34 ------------------- .../source/_templates/sidebar-nav-bs.html | 34 ------------------- 2 files changed, 68 deletions(-) delete mode 100644 docs/cudf/source/_templates/sidebar-nav-bs.html delete mode 100644 docs/dask_cudf/source/_templates/sidebar-nav-bs.html diff --git a/docs/cudf/source/_templates/sidebar-nav-bs.html b/docs/cudf/source/_templates/sidebar-nav-bs.html deleted file mode 100644 index ef294f0a8d19..000000000000 --- a/docs/cudf/source/_templates/sidebar-nav-bs.html +++ /dev/null @@ -1,34 +0,0 @@ -{# Displays navigation below the top-level navbar while preserving foldable sections. #} -{% 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 special_page %} - {% set nav_tree = generate_toctree_html( - "sidebar", - startdepth=0, - 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, - ) %} -{% else %} - {% 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 active_item = nav_tree.select_one("li.current") %} - {% set active_children = active_item.select_one("ul") if active_item else none %} - {% set nav_tree = active_children if active_children else nav_tree %} -{% endif %} - diff --git a/docs/dask_cudf/source/_templates/sidebar-nav-bs.html b/docs/dask_cudf/source/_templates/sidebar-nav-bs.html deleted file mode 100644 index ef294f0a8d19..000000000000 --- a/docs/dask_cudf/source/_templates/sidebar-nav-bs.html +++ /dev/null @@ -1,34 +0,0 @@ -{# Displays navigation below the top-level navbar while preserving foldable sections. #} -{% 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 special_page %} - {% set nav_tree = generate_toctree_html( - "sidebar", - startdepth=0, - 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, - ) %} -{% else %} - {% 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 active_item = nav_tree.select_one("li.current") %} - {% set active_children = active_item.select_one("ul") if active_item else none %} - {% set nav_tree = active_children if active_children else nav_tree %} -{% endif %} - From 1c6b8e5a71cb134b0dbbe8fac52efb24ecbe200d Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Mon, 29 Jun 2026 18:24:02 -0500 Subject: [PATCH 8/9] Start docs sidebar below primary nav --- .../source/_templates/sidebar-nav-bs.html | 30 +++++++++++++++++++ .../source/_templates/sidebar-nav-bs.html | 30 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 docs/cudf/source/_templates/sidebar-nav-bs.html create mode 100644 docs/dask_cudf/source/_templates/sidebar-nav-bs.html diff --git a/docs/cudf/source/_templates/sidebar-nav-bs.html b/docs/cudf/source/_templates/sidebar-nav-bs.html new file mode 100644 index 000000000000..b2bef5e9f304 --- /dev/null +++ b/docs/cudf/source/_templates/sidebar-nav-bs.html @@ -0,0 +1,30 @@ +{# Display top-level section landing pages one level below the primary nav. #} +{% 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 %} + +{% endif %} diff --git a/docs/dask_cudf/source/_templates/sidebar-nav-bs.html b/docs/dask_cudf/source/_templates/sidebar-nav-bs.html new file mode 100644 index 000000000000..b2bef5e9f304 --- /dev/null +++ b/docs/dask_cudf/source/_templates/sidebar-nav-bs.html @@ -0,0 +1,30 @@ +{# Display top-level section landing pages one level below the primary nav. #} +{% 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 %} + +{% endif %} From 46db3eff9d0e823dd8256e48669482694a24f628 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Tue, 30 Jun 2026 13:51:24 -0500 Subject: [PATCH 9/9] Document docs sidebar override --- .../source/_templates/sidebar-nav-bs.html | 16 +++++++++- .../source/_templates/sidebar-nav-bs.html | 31 +------------------ 2 files changed, 16 insertions(+), 31 deletions(-) mode change 100644 => 120000 docs/dask_cudf/source/_templates/sidebar-nav-bs.html diff --git a/docs/cudf/source/_templates/sidebar-nav-bs.html b/docs/cudf/source/_templates/sidebar-nav-bs.html index b2bef5e9f304..92633b7e35fc 100644 --- a/docs/cudf/source/_templates/sidebar-nav-bs.html +++ b/docs/cudf/source/_templates/sidebar-nav-bs.html @@ -1,4 +1,18 @@ -{# Display top-level section landing pages one level below the primary nav. #} +{# + 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
    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 %} diff --git a/docs/dask_cudf/source/_templates/sidebar-nav-bs.html b/docs/dask_cudf/source/_templates/sidebar-nav-bs.html deleted file mode 100644 index b2bef5e9f304..000000000000 --- a/docs/dask_cudf/source/_templates/sidebar-nav-bs.html +++ /dev/null @@ -1,30 +0,0 @@ -{# Display top-level section landing pages one level below the primary nav. #} -{% 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 %} - -{% endif %} diff --git a/docs/dask_cudf/source/_templates/sidebar-nav-bs.html b/docs/dask_cudf/source/_templates/sidebar-nav-bs.html new file mode 120000 index 000000000000..a09b1f8162f2 --- /dev/null +++ b/docs/dask_cudf/source/_templates/sidebar-nav-bs.html @@ -0,0 +1 @@ +../../../cudf/source/_templates/sidebar-nav-bs.html \ No newline at end of file