diff options
Diffstat (limited to 'website/src/components/SiteTitle.astro')
| -rw-r--r-- | website/src/components/SiteTitle.astro | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/website/src/components/SiteTitle.astro b/website/src/components/SiteTitle.astro index 1173f2b6..d35da5d6 100644 --- a/website/src/components/SiteTitle.astro +++ b/website/src/components/SiteTitle.astro @@ -1,5 +1,7 @@ --- const { siteTitle, siteTitleHref } = Astro.locals.starlightRoute; +const isPreview = Astro.url.pathname === '/docs/preview/' || Astro.url.pathname.startsWith('/docs/preview/'); +const docsHref = isPreview ? '/docs/preview/' : '/docs/'; --- <div class="title-row sl-flex"> @@ -8,7 +10,7 @@ const { siteTitle, siteTitleHref } = Astro.locals.starlightRoute; <span translate="no">{siteTitle}</span> </a> <nav class="title-nav" aria-label="Primary"> - <a href="/docs/">Docs</a> + <a href={docsHref}>Docs</a> <a href="/releases/">Releases</a> <a href="/blog/">Blog</a> </nav> |
