mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
feat: integrate Astro fonts API with Google Sans Code font (#602)
- Add Google Sans Code font and make it the default font - Font is preloaded with latin subset and weight 400 and style normal for optimal performance - Add font configuration section in how to config docs
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
---
|
||||
import { Font } from "astro:assets";
|
||||
import { ClientRouter } from "astro:transitions";
|
||||
import { PUBLIC_GOOGLE_SITE_VERIFICATION } from "astro:env/client";
|
||||
import { SITE } from "@/config";
|
||||
@@ -60,6 +61,12 @@ const structuredData = {
|
||||
<link rel="canonical" href={canonicalURL} />
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
|
||||
<!-- Load Font -->
|
||||
<Font
|
||||
cssVariable="--font-google-sans-code"
|
||||
preload={[{ subset: "latin", weight: 400, style: "normal" }]}
|
||||
/>
|
||||
|
||||
<!-- General Meta Tags -->
|
||||
<title>{title}</title>
|
||||
<meta name="title" content={title} />
|
||||
|
||||
Reference in New Issue
Block a user