fix: properly load ubuntu font

This commit is contained in:
Alexander Daichendt 2025-01-01 15:28:23 +01:00
parent 3955e219e6
commit 245ad3a625
3 changed files with 68 additions and 68 deletions

View file

@ -6,9 +6,9 @@ import ubuntuRegularWoff2 from "@fontsource/ubuntu/files/ubuntu-latin-400-normal
import ubuntuBoldWoff2 from "@fontsource/ubuntu/files/ubuntu-latin-700-normal.woff2?url";
interface Props {
title: string;
description: string;
image?: string;
title: string;
description: string;
image?: string;
}
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
@ -24,18 +24,18 @@ const { title, description, image = "/blog-placeholder-1.jpg" } = Astro.props;
<!-- Font preloads, keep them even if it throws a warning for not using them due to the system providing them -->
<link
rel="preload"
href={ubuntuRegularWoff2}
as="font"
type="font/woff2"
crossorigin
rel="preload"
href={ubuntuRegularWoff2}
as="font"
type="font/woff2"
crossorigin
/>
<link
rel="preload"
href={ubuntuBoldWoff2}
as="font"
type="font/woff2"
crossorigin
rel="preload"
href={ubuntuBoldWoff2}
as="font"
type="font/woff2"
crossorigin
/>
<!-- Canonical URL -->