Skip to content

Commit

Permalink
Merge branch 'main' into mt/persist-props
Browse files Browse the repository at this point in the history
  • Loading branch information
sarah11918 authored Jul 5, 2024
2 parents af8cb9f + b45f2ec commit 9f2e155
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/starlight/Head.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const { isFallback, lang } = Astro.props;
const ogImageUrl = getOgImageUrl(Astro.url.pathname, !!isFallback);
const imageSrc = ogImageUrl ?? '/default-og-image.png';
const canonicalImageSrc = new URL(imageSrc, Astro.site);
const is404 = Astro.url.pathname.endsWith('/404/');
---

<Default {...Astro.props}><slot /></Default>
Expand All @@ -19,4 +20,8 @@ const canonicalImageSrc = new URL(imageSrc, Astro.site);
<meta name="twitter:site" content="astrodotbuild" />

<!-- Fathom analytics -->
<script src="https://cdn.usefathom.com/script.js" data-site="EZBHTSIG" defer></script>
<script
src="https://cdn.usefathom.com/script.js"
data-site="EZBHTSIG"
data-canonical={is404 ? 'false' : 'true'}
defer></script>

0 comments on commit 9f2e155

Please sign in to comment.