aboutsummaryrefslogtreecommitdiffstats
path: root/src/theme/Root.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/theme/Root.tsx')
-rw-r--r--src/theme/Root.tsx11
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
7import Head from '@docusaurus/Head';
7import type { Props } from '@theme/Root'; 8import type { Props } from '@theme/Root';
8import Root from '@theme-original/Root'; 9import Root from '@theme-original/Root';
9 10
10import ActiveSectionProvider from '@site/src/components/ActiveSectionProvider'; 11import ActiveSectionProvider from '@site/src/components/ActiveSectionProvider';
12import fontURL from '@site/src/fonts/recursive-latin.woff2?url';
11 13
12export default function RootWrapper(props: Props) { 14export 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 );