perf: migrate Google Fonts link tags to next/font self-hosted (eliminates render-blocking font request)
This commit is contained in:
parent
5e38676b87
commit
8a3ad5ace8
1 changed files with 15 additions and 11 deletions
|
|
@ -1,6 +1,20 @@
|
|||
import type { Metadata } from "next";
|
||||
import { Inter, JetBrains_Mono } from "next/font/google";
|
||||
import "./globals.css";
|
||||
|
||||
const inter = Inter({
|
||||
subsets: ["latin"],
|
||||
variable: "--font-inter",
|
||||
display: "swap",
|
||||
});
|
||||
|
||||
const jetbrainsMono = JetBrains_Mono({
|
||||
subsets: ["latin"],
|
||||
variable: "--font-jetbrains-mono",
|
||||
display: "swap",
|
||||
weight: ["400", "500"],
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Zachary Gaetano | Broadcast Systems Integration & Production Facility Design",
|
||||
description:
|
||||
|
|
@ -138,18 +152,8 @@ export default function RootLayout({
|
|||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<html lang="en" className={`${inter.variable} ${jetbrainsMono.variable}`}>
|
||||
<head>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link
|
||||
rel="preconnect"
|
||||
href="https://fonts.gstatic.com"
|
||||
crossOrigin="anonymous"
|
||||
/>
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<link rel="icon" href="/images/dragon-mark.png" type="image/png" />
|
||||
<link rel="apple-touch-icon" href="/images/dragon-mark.png" />
|
||||
<script
|
||||
|
|
|
|||
Loading…
Reference in a new issue