mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-27 08:58:30 -04:00
preload common fonts (in a horrifically hard-coded fashion)
This commit is contained in:
parent
cf98cf632c
commit
748f1c4b4c
@ -1,5 +1,6 @@
|
||||
import { useEffect } from "react";
|
||||
import { useRouter } from "next/router";
|
||||
import Head from "next/head";
|
||||
import { ThemeProvider } from "next-themes";
|
||||
import { DefaultSeo, SocialProfileJsonLd } from "next-seo";
|
||||
import * as Fathom from "fathom-client";
|
||||
@ -69,6 +70,25 @@ const App = ({ Component, pageProps }: Props) => {
|
||||
<>
|
||||
<ThemeProvider>{getLayout(<Component {...pageProps} />)}</ThemeProvider>
|
||||
|
||||
{/* static asset preloads */}
|
||||
<Head>
|
||||
{/* TODO: these hrefs will change at some point (and possibly unpredictably). find a better way... */}
|
||||
<link
|
||||
rel="preload"
|
||||
as="font"
|
||||
type="font/woff2"
|
||||
href="/_next/static/media/inter-latin-variable-full-normal.79d31200.woff2"
|
||||
crossOrigin="anonymous"
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
as="font"
|
||||
type="font/woff2"
|
||||
href="/_next/static/media/roboto-mono-latin-variable-wghtOnly-normal.3689861c.woff2"
|
||||
crossOrigin="anonymous"
|
||||
/>
|
||||
</Head>
|
||||
|
||||
{/* all SEO config is in ./lib/seo.ts except for canonical URLs, which require access to next router */}
|
||||
<DefaultSeo
|
||||
{...defaultSeo}
|
||||
|
Loading…
x
Reference in New Issue
Block a user