Skip to content

Commit

Permalink
Add vercel speed insights
Browse files Browse the repository at this point in the history
  • Loading branch information
solomonhawk committed Aug 17, 2024
1 parent 9bafdf5 commit 1ab8435
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 6 deletions.
55 changes: 49 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,8 @@
"typescript": "^5.2.2",
"unist-util-visit": "^4.1.1",
"zod": "^3.22.4"
},
"dependencies": {
"@vercel/speed-insights": "^1.0.12"
}
}
3 changes: 3 additions & 0 deletions src/layouts/Page.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import SpeedInsights from '@vercel/speed-insights/astro';
import { ViewTransitions } from 'astro:transitions';
import BaseHead from '@/components/BaseHead.astro';
Expand Down Expand Up @@ -28,5 +29,7 @@ const { title, description } = content;
</div>
</div>
</main>

<SpeedInsights />
</body>
</html>
3 changes: 3 additions & 0 deletions src/layouts/PostLayout.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import SpeedInsights from '@vercel/speed-insights/astro';
import type { CollectionEntry } from 'astro:content';
import { ViewTransitions } from 'astro:transitions';
Expand Down Expand Up @@ -38,5 +39,7 @@ const { title, description, publishDate, tags } = frontmatter;
<Logo class="mx-auto block h-8 w-8" />
</a>
</footer>

<SpeedInsights />
</body>
</html>

0 comments on commit 1ab8435

Please sign in to comment.