Skip to content

Commit 1b19efb

Browse files
committed
Add Search link to docs sidebar nav
The mobile sidebar nav on docs/blog pages was missing the Search link that the header nav has, leaving search unreachable from the menu on those pages. Add it via a new SEARCH_BASE_URL constant alongside the existing DOCS_BASE_URL and BLOG_BASE_URL.
1 parent 430cfe3 commit 1b19efb

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

docs/app/site.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from sprag import ui
22

3-
from .urls import BLOG_BASE_URL, DOCS_BASE_URL
3+
from .urls import BLOG_BASE_URL, DOCS_BASE_URL, SEARCH_BASE_URL
44

55

66
def card(title, href, description, meta=None):
@@ -28,6 +28,7 @@ def docs_sidebar(sections, current_path, id_=None):
2828
nav_links = ui.div(
2929
ui.a("Docs", href=DOCS_BASE_URL, class_="sidebar-nav-link"),
3030
ui.a("Blog", href=BLOG_BASE_URL, class_="sidebar-nav-link"),
31+
ui.a("Search", href=SEARCH_BASE_URL, class_="sidebar-nav-link"),
3132
ui.a("GitHub", href="https://github.com/BleedingXiko/SPRAG",
3233
target="_blank", class_="sidebar-nav-link"),
3334
class_="sidebar-nav",

docs/app/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33

44
DOCS_BASE_URL = join_url("/", "docs")
55
BLOG_BASE_URL = join_url("/", "blog")
6+
SEARCH_BASE_URL = join_url("/", "search")

0 commit comments

Comments
 (0)