diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-22 14:58:26 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-22 14:59:09 +0300 |
| commit | c234f221f9be698bc0501c60459e1ae8e67df6c3 (patch) | |
| tree | 944b4dec10fada8d93456dc5a85e6bfdb36a8b8b /website/src/components/SiteTitle.astro | |
| parent | ef85fa0c7ebb48bb59fe7593af5a67f3e02ff3d4 (diff) | |
feat(docs): publish versioned release documentation
Diffstat (limited to 'website/src/components/SiteTitle.astro')
| -rw-r--r-- | website/src/components/SiteTitle.astro | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/website/src/components/SiteTitle.astro b/website/src/components/SiteTitle.astro index 576e7635..3e5af0a3 100644 --- a/website/src/components/SiteTitle.astro +++ b/website/src/components/SiteTitle.astro @@ -1,8 +1,11 @@ --- +import { docsRoute } from '../docs-path'; + const { siteTitle, siteTitleHref, locale } = Astro.locals.starlightRoute; -const isPreview = Astro.url.pathname === '/docs/preview/' || Astro.url.pathname.startsWith('/docs/preview/'); +const route = docsRoute(Astro.url.pathname); const localePrefix = locale ? `/${locale}` : ''; -const docsHref = isPreview ? '/docs/preview/' : `${localePrefix}/docs/`; +const targetSegment = route.target === 'stable' ? '' : `/${route.target}`; +const docsHref = `${localePrefix}/docs${targetSegment}/`; --- <div class="title-row sl-flex"> |
