summaryrefslogtreecommitdiffhomepage
path: root/packages/web/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'packages/web/src/components')
-rw-r--r--packages/web/src/components/Head.astro4
1 files changed, 3 insertions, 1 deletions
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) {
<Default {...Astro.props}><slot /></Default>
-{ (isDocs || !slug.startsWith("s")) && (
+{ (!slug.startsWith(`${base}/s`)) && (
<meta property="og:image" content={ogImage} />
<meta property="twitter:image" content={ogImage} />
)}