diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index 324bba8..fcd5aa1 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -12,6 +12,11 @@ interface Props { } const { user = null } = Astro.props; + +// The navbar is shared by every route, so the search box pre-fills from the +// current ?q= and submits back to the catalog. That keeps search working from +// pages that have no catalog of their own (a plugin or publisher page). +const searchValue = Astro.url.searchParams.get('q') ?? ''; ---
@@ -30,7 +35,12 @@ const { user = null } = Astro.props; -
+
+ +