diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/theme/SiteMetadata.jsx | 27 | ||||
-rw-r--r-- | src/types.d.ts | 10 |
2 files changed, 35 insertions, 2 deletions
diff --git a/src/theme/SiteMetadata.jsx b/src/theme/SiteMetadata.jsx new file mode 100644 index 0000000..13a7678 --- /dev/null +++ b/src/theme/SiteMetadata.jsx | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2024 Kristóf Marussy | ||
3 | * | ||
4 | * SPDX-License-Identifier: MIT | ||
5 | */ | ||
6 | |||
7 | import Head from '@docusaurus/Head'; | ||
8 | import fontURL from '@fontsource-variable/recursive/files/recursive-latin-full-normal.woff2?url'; | ||
9 | |||
10 | import SiteMetadata from '@theme-original/SiteMetadata'; | ||
11 | |||
12 | export default function SiteMetadataWrapper(props) { | ||
13 | return ( | ||
14 | <> | ||
15 | <Head> | ||
16 | <link | ||
17 | rel="preload" | ||
18 | href={fontURL} | ||
19 | as="font" | ||
20 | type="font/woff2" | ||
21 | crossOrigin="anonymous" | ||
22 | /> | ||
23 | </Head> | ||
24 | <SiteMetadata {...props} /> | ||
25 | </> | ||
26 | ); | ||
27 | } | ||
diff --git a/src/types.d.ts b/src/types.d.ts index a2ff976..157ed0b 100644 --- a/src/types.d.ts +++ b/src/types.d.ts | |||
@@ -1,9 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016, Jeremy Stucki | 2 | * Copyright (c) 2016, Jeremy Stucki |
3 | * Copyright (c) 2024 Kristóf Marussy | ||
3 | * | 4 | * |
4 | * SPDX-License-Identifier: BSD-3-Clause | 5 | * SPDX-License-Identifier: MIT AND BSD-3-Clause |
5 | * | 6 | * |
6 | * Typings copied from | 7 | * Typings for `ResponsiveImageOutput` copied from |
7 | * https://github.com/dazuaz/responsive-loader/blob/ef2c806fcd36f06f6be8a0b97e09f40c3d86d3ac/README.md | 8 | * https://github.com/dazuaz/responsive-loader/blob/ef2c806fcd36f06f6be8a0b97e09f40c3d86d3ac/README.md |
8 | */ | 9 | */ |
9 | 10 | ||
@@ -21,3 +22,8 @@ declare module '*&rl' { | |||
21 | const src: ResponsiveImageOutput; | 22 | const src: ResponsiveImageOutput; |
22 | export default src; | 23 | export default src; |
23 | } | 24 | } |
25 | |||
26 | declare module '*?url' { | ||
27 | const url: string; | ||
28 | export default string; | ||
29 | } | ||