From 42b440be0c63e3b7937799aea839086c6808e37b Mon Sep 17 00:00:00 2001 From: Jay V Date: Thu, 4 Sep 2025 00:53:45 -0700 Subject: docs: handle base path --- packages/web/src/components/Head.astro | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'packages/web/src') diff --git a/packages/web/src/components/Head.astro b/packages/web/src/components/Head.astro index f6166f58f..0eaf115b5 100644 --- a/packages/web/src/components/Head.astro +++ b/packages/web/src/components/Head.astro @@ -4,6 +4,8 @@ import type { Props } from '@astrojs/starlight/props' import Default from '@astrojs/starlight/components/Head.astro' import config from '../../config.mjs' +const base = import.meta.env.BASE_URL.slice(1) + const slug = Astro.url.pathname.replace(/^\//, "").replace(/\/$/, ""); const { entry: { @@ -42,7 +44,7 @@ if (isDocs) { -{ (isDocs || !slug.startsWith("s")) && ( +{ (!slug.startsWith(`${base}/s`)) && ( )} -- cgit v1.2.3