Skip to content

Commit a5a3309

Browse files
committed
docs: remove version-switcher + drop external-link arrow on navbar
Two small navbar cleanups: 1. Drop ``version-switcher`` from ``navbar_center`` and remove the companion ``switcher``/``json_url``/``version_match`` config. The project does not ship versioned docs, so the "Choose version" dropdown was a permanent no-op stub. 2. Switch the cross-subsite anchor template from ``nav-external`` to ``nav-internal``. The three links (MetaSim / RoboVerse / FAQ) point at sibling subsites on the same roboverse.wiki deployment; pydata's ↗ arrow icon for external links misled readers.
1 parent 06308c5 commit a5a3309

2 files changed

Lines changed: 15 additions & 13 deletions

File tree

docs/source/_templates/navbar-nav.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
{# Override pydata_sphinx_theme's navbar-nav: render ONLY ``external_links``,
22
not the top-level toctree entries. We use the left sidebar (configured via
3-
html_sidebars = {"**": ["globaltoc.html"]}) for in-site navigation, so the
4-
top bar is reserved for the two cross-subsite links (MetaSim ↔ RoboVerse). #}
3+
html_sidebars = {"**": ["sidebar-section-nav.html"]}) for in-site
4+
navigation, so the top bar is reserved for the cross-subsite links
5+
(MetaSim / RoboVerse / FAQ).
6+
7+
Note we tag the anchors as ``nav-internal`` even though the URLs are
8+
absolute paths. They're internal to the same roboverse.wiki deployment
9+
— pydata's ``nav-external`` class would otherwise append a small "↗"
10+
arrow icon that misleads readers into thinking they leave the site. #}
511
<nav>
612
<ul class="bd-navbar-elements navbar-nav">
713
{%- for external_link in theme_external_links %}
814
<li class="nav-item">
9-
<a class="nav-link nav-external" href="{{ external_link.url }}">
15+
<a class="nav-link nav-internal" href="{{ external_link.url }}">
1016
{{ external_link.name }}
1117
</a>
1218
</li>

docs/source/conf.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@
5555
html_logo = "_static/RoboVerse86.22.svg"
5656
html_favicon = "_static/logo.png"
5757

58-
json_url = "_static/version_switcher.json"
59-
version_match = os.environ.get("READTHEDOCS_VERSION")
6058
html_theme_options = {
6159
"show_nav_level": 1,
6260
"use_edit_page_button": True,
@@ -75,20 +73,18 @@
7573
"logo": {
7674
"image_dark": "_static/RoboVerse86.22.svg",
7775
},
78-
# Top navbar shows only the two cross-subsite links (MetaSim ↔ RoboVerse)
79-
# via ``external_links`` (rendered through our overridden navbar-nav
80-
# template). All in-site navigation lives in the left sidebar.
81-
"navbar_center": ["version-switcher", "navbar-nav"],
76+
# Top navbar shows only the cross-subsite links (MetaSim / RoboVerse /
77+
# FAQ) via ``external_links`` (rendered through our overridden
78+
# navbar-nav template). All in-site navigation lives in the left
79+
# sidebar. ``version-switcher`` is intentionally NOT in
80+
# ``navbar_center`` — the project does not ship versioned docs.
81+
"navbar_center": ["navbar-nav"],
8282
"external_links": [
8383
{"name": "MetaSim", "url": "/metasim/"},
8484
{"name": "RoboVerse", "url": "/roboverse/"},
8585
{"name": "FAQ", "url": "/FAQ/"},
8686
],
8787
"show_version_warning_banner": False,
88-
"switcher": {
89-
"json_url": json_url,
90-
"version_match": version_match,
91-
},
9288
"sidebarwidth": "150px",
9389
}
9490

0 commit comments

Comments
 (0)