Skip to content

Commit 0a44fa8

Browse files
committed
revise: prefetch fonts
1 parent ed4944e commit 0a44fa8

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

.vitepress/config.mts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,21 @@ export default defineConfig({
2424
appearance: "force-dark",
2525
base: "/",
2626
ignoreDeadLinks: ["./LICENSE"],
27-
head: [["link", { rel: "icon", href: "/favicon.ico" }]],
27+
head: [
28+
["link", { rel: "icon", href: "/favicon.ico" }],
29+
["link", { rel: "preconnect", href: "https://fonts.googleapis.com" }],
30+
[
31+
"link",
32+
{ rel: "preconnect", href: "https://fonts.gstatic.com", crossorigin: "" },
33+
],
34+
[
35+
"link",
36+
{
37+
href: "https://fonts.googleapis.com/css2?family=Martian+Mono:wght@100..800&family=Public+Sans:ital,wght@0,100..900;1,100..900&display=swap",
38+
rel: "stylesheet",
39+
},
40+
],
41+
],
2842
themeConfig: {
2943
/**
3044
* Logo and site title.

.vitepress/theme/style.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
* https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
44
*/
55

6-
@import url('https://fonts.googleapis.com/css2?family=Martian+Mono:wght@100..800&family=Public+Sans:ital,wght@0,100..900;1,100..900&display=swap');
7-
86
/**
97
* Colors
108
*

0 commit comments

Comments
 (0)