diff options
Diffstat (limited to 'src/theme/Root.tsx')
-rw-r--r-- | src/theme/Root.tsx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/theme/Root.tsx b/src/theme/Root.tsx index 9459e9f..32462bb 100644 --- a/src/theme/Root.tsx +++ b/src/theme/Root.tsx | |||
@@ -4,14 +4,25 @@ | |||
4 | * SPDX-License-Identifier: MIT | 4 | * SPDX-License-Identifier: MIT |
5 | */ | 5 | */ |
6 | 6 | ||
7 | import Head from '@docusaurus/Head'; | ||
7 | import type { Props } from '@theme/Root'; | 8 | import type { Props } from '@theme/Root'; |
8 | import Root from '@theme-original/Root'; | 9 | import Root from '@theme-original/Root'; |
9 | 10 | ||
10 | import ActiveSectionProvider from '@site/src/components/ActiveSectionProvider'; | 11 | import ActiveSectionProvider from '@site/src/components/ActiveSectionProvider'; |
12 | import fontURL from '@site/src/fonts/recursive-latin.woff2?url'; | ||
11 | 13 | ||
12 | export default function RootWrapper(props: Props) { | 14 | export default function RootWrapper(props: Props) { |
13 | return ( | 15 | return ( |
14 | <ActiveSectionProvider> | 16 | <ActiveSectionProvider> |
17 | <Head> | ||
18 | <link | ||
19 | rel="preload" | ||
20 | href={fontURL} | ||
21 | as="font" | ||
22 | type="font/woff2" | ||
23 | crossOrigin="anonymous" | ||
24 | /> | ||
25 | </Head> | ||
15 | <Root {...props} /> | 26 | <Root {...props} /> |
16 | </ActiveSectionProvider> | 27 | </ActiveSectionProvider> |
17 | ); | 28 | ); |