Skip to content

Commit

Permalink
Merge pull request #192 from Trombach/improvement/font-preloading
Browse files Browse the repository at this point in the history
Preload `Inter` font
  • Loading branch information
Trombach authored May 13, 2024
2 parents 10955e3 + 95cc467 commit 7dba1ce
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Navbar from "@components/Nav/Navbar.astro";
import ThemeProvider from "@components/Nav/ThemeProvider.astro";
import SEO from "@components/SEO.astro";
import "@fontsource-variable/inter";
import InterWoff2 from "@fontsource-variable/inter/files/inter-latin-wght-normal.woff2?url";
import "@fontsource-variable/jetbrains-mono";
import SpeedInsights from "@vercel/speed-insights/astro";
import { ViewTransitions } from "astro:transitions";
Expand All @@ -24,6 +25,13 @@ const { title, description = "Lukas' Homepage" } = Astro.props;
<meta name="viewport" content="width=device-width" />

<slot name="preload" />
<link
rel="preload"
as="font"
href={InterWoff2}
type="font/woff2"
crossorigin
/>

<slot name="seo">
<SEO {title} {description} />
Expand Down

1 comment on commit 7dba1ce

@vercel
Copy link

@vercel vercel bot commented on 7dba1ce May 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

astro-homepage – ./

astro-homepage-trombachs-projects.vercel.app
astro-homepage-git-main-trombachs-projects.vercel.app

Please sign in to comment.