Skip to content

Commit 2f6e156

Browse files
committed
Move analytics to Head.astro override
1 parent 30d6844 commit 2f6e156

File tree

3 files changed

+9
-101
lines changed

3 files changed

+9
-101
lines changed

astro.config.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ export default defineConfig({
4444
github: "https://github.com/aptos-labs/",
4545
},
4646
components: {
47-
// Override the default `Head` component.
48-
PageFrame: "./src/components/PageFrame.astro",
47+
Head: "./src/starlight-overrides/Head.astro",
4948
},
5049
plugins: [
5150
// Generate the OpenAPI documentation pages.

src/components/PageFrame.astro

Lines changed: 0 additions & 99 deletions
This file was deleted.

src/starlight-overrides/Head.astro

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
import type { Props } from '@astrojs/starlight/props';
3+
import Default from '@astrojs/starlight/components/Head.astro';
4+
import Analytics from "@vercel/analytics/astro"
5+
---
6+
7+
<Default {...Astro.props}><slot /></Default>
8+
<Analytics />

0 commit comments

Comments
 (0)