feat: use nextjs 10.2 optimized font loading

This commit is contained in:
Timothy Lin 2021-05-01 10:33:58 +08:00
parent 3b0172a11d
commit 52e1fcd008

View File

@ -24,22 +24,9 @@ class MyDocument extends Document {
<link rel="alternate" type="application/rss+xml" href="/index.xml" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
<link
rel="preload"
as="style"
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap"
/>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap"
media="print"
onLoad="this.media='all'"
/>
<noscript>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap"
/>
</noscript>
<link
rel="preload"
href="https://cdn.jsdelivr.net/npm/katex@0.13.0/dist/fonts/KaTeX_Main-Regular.woff2"