diff --git a/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/navbar-nav.html b/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/navbar-nav.html index 0eeaf4934..710d513a8 100644 --- a/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/navbar-nav.html +++ b/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/navbar-nav.html @@ -12,8 +12,6 @@ {{ _("Site Navigation") }}

diff --git a/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/theme.conf b/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/theme.conf index 97598c547..3124424fd 100644 --- a/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/theme.conf +++ b/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/theme.conf @@ -30,6 +30,7 @@ show_nav_level = 1 show_toc_level = 1 navbar_align = content header_links_before_dropdown = 5 +header_dropdown_text = More switcher = check_switcher = True pygment_light_style = a11y-high-contrast-light diff --git a/src/pydata_sphinx_theme/toctree.py b/src/pydata_sphinx_theme/toctree.py index 17003c30c..e4a62bd8d 100644 --- a/src/pydata_sphinx_theme/toctree.py +++ b/src/pydata_sphinx_theme/toctree.py @@ -13,6 +13,7 @@ from sphinx.addnodes import toctree as toctree_node from sphinx.application import Sphinx from sphinx.environment.adapters.toctree import TocTree +from sphinx.locale import _ from .utils import traverse_or_findall @@ -54,7 +55,7 @@ def create_next_id(base_id: str): @lru_cache(maxsize=None) def generate_header_nav_html( - dropdown_id: str, n_links_before_dropdown: int = 5 + n_links_before_dropdown: int = 5, dropdown_text: str = "More" ) -> str: """Generate top-level links that are meant for the header navigation. @@ -72,6 +73,7 @@ def generate_header_nav_html( Parameters: n_links_before_dropdown:The number of links to show before nesting the remaining links in a Dropdown element. + dropdown_text:Text of the dropdown element button. """ try: n_links_before_dropdown = int(n_links_before_dropdown) @@ -168,7 +170,7 @@ def generate_header_nav_html( out += f"""