Skip to content

Commit 5b2eead

Browse files
committed
perf: dns-prefetch
1 parent dd4d538 commit 5b2eead

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/components/Seo.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import Head from 'next/head';
22
import { useRouter } from 'next/router';
33

4+
import { API_HOST } from '@/utils/api';
5+
46
// !STARTERCONF Change these default meta
57
const defaultMeta = {
68
title: 'HelloGitHub',
@@ -115,6 +117,7 @@ export default function Seo(props: SeoProps) {
115117

116118
return (
117119
<Head>
120+
<link rel='dns-prefetch' href={API_HOST} />
118121
<title>{`${meta.title} - HelloGitHub`}</title>
119122
<meta name='robots' content={meta.robots} />
120123
<meta content={meta.description} name='description' />

src/styles/iconfont.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
src: url('../../public/font/iconfont.woff2?t=1684124673183') format('woff2'),
44
url('../../public/font/iconfont.woff?t=1684124673183') format('woff'),
55
url('../../public/font/iconfont.ttf?t=1684124673183') format('truetype');
6+
font-display: swap;
67
}
78

89
.iconfont {

0 commit comments

Comments
 (0)