feat: add umami tracking
All checks were successful
Build and Push Docker Image / BuildAndPush (push) Successful in 1m12s

This commit is contained in:
Lars Hampe 2024-08-17 19:39:07 +02:00
parent dfc2c6a70e
commit 1f54c30975

View File

@ -1,18 +1,18 @@
---
// Import the global.css file here so that it is included on
// all pages through the use of the <BaseHead /> component.
import { ViewTransitions } from 'astro:transitions';
import '../styles/global.css';
import { ViewTransitions } from "astro:transitions";
import "../styles/global.css";
interface Props {
title: string;
description: string;
image?: string;
title: string;
description: string;
image?: string;
}
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
const { title, description, image = '/blog-placeholder-1.jpg' } = Astro.props;
const { title, description, image = "/blog-placeholder-1.jpg" } = Astro.props;
---
<!-- Global Metadata -->
@ -22,8 +22,20 @@ const { title, description, image = '/blog-placeholder-1.jpg' } = Astro.props;
<meta name="generator" content={Astro.generator} />
<!-- Font preloads -->
<link rel="preload" href="/fonts/atkinson-regular.woff" as="font" type="font/woff" crossorigin />
<link rel="preload" href="/fonts/atkinson-bold.woff" as="font" type="font/woff" crossorigin />
<link
rel="preload"
href="/fonts/atkinson-regular.woff"
as="font"
type="font/woff"
crossorigin
/>
<link
rel="preload"
href="/fonts/atkinson-bold.woff"
as="font"
type="font/woff"
crossorigin
/>
<!-- Canonical URL -->
<link rel="canonical" href={canonicalURL} />
@ -46,4 +58,11 @@ const { title, description, image = '/blog-placeholder-1.jpg' } = Astro.props;
<meta property="twitter:title" content={title} />
<meta property="twitter:description" content={description} />
<meta property="twitter:image" content={new URL(image, Astro.url)} />
<ViewTransitions />
<ViewTransitions />
<!-- Umami -->
<script
defer
src="https://umami.hashdot.co/script.js"
data-website-id="c3a81f8f-eaf2-4e3f-bdd5-7a62e2779a98"></script>