Skip to content

Commit 2366ede

Browse files
authored
use fontsource rather than manually uploaded font (#93)
1 parent 295b34b commit 2366ede

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

docusaurus.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ const config: Config = {
3333
trailingSlash: false,
3434
noIndex: preview,
3535
baseUrlIssueBanner: false,
36-
clientModules: [require.resolve("../src/css/custom.css")],
36+
clientModules: [
37+
require.resolve("../src/css/custom.css"),
38+
require.resolve("@fontsource/jetbrains-mono/index.css"),
39+
],
3740

3841
webpack: {
3942
jsLoader: (isServer) => ({

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"@docusaurus/theme-classic": "2.0.1",
3232
"@docusaurus/theme-common": "2.0.1",
3333
"@docusaurus/theme-search-algolia": "2.0.1",
34+
"@fontsource/jetbrains-mono": "4.5.11",
3435
"@mdx-js/react": "1.6.22",
3536
"clsx": "1.2.1",
3637
"prism-react-renderer": "1.3.5",
-18.7 KB
Binary file not shown.

src/css/custom.css

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
@font-face {
2-
font-family: "JetBrains Mono";
3-
font-style: normal;
4-
font-weight: 400;
5-
src: url("../assets/JetBrainsMono-Regular.woff2") format("woff2");
6-
}
7-
81
:root {
92
--ifm-color-primary: #0240dc;
103
--ifm-color-primary-dark: #033ed5;

yarn.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3355,6 +3355,13 @@ __metadata:
33553355
languageName: node
33563356
linkType: hard
33573357

3358+
"@fontsource/jetbrains-mono@npm:4.5.11":
3359+
version: 4.5.11
3360+
resolution: "@fontsource/jetbrains-mono@npm:4.5.11"
3361+
checksum: 2f794029028287093b1b6499d8d04058d70a832932631e27ede235fcba025c42099515dbd46d483eb376cf3c27c604d0104c092dc73505f769bef201ffe17c7b
3362+
languageName: node
3363+
linkType: hard
3364+
33583365
"@gar/promisify@npm:^1.1.3":
33593366
version: 1.1.3
33603367
resolution: "@gar/promisify@npm:1.1.3"
@@ -6107,6 +6114,7 @@ __metadata:
61076114
"@docusaurus/theme-search-algolia": 2.0.1
61086115
"@docusaurus/types": 2.0.1
61096116
"@fec/remark-a11y-emoji": 3.1.0
6117+
"@fontsource/jetbrains-mono": 4.5.11
61106118
"@mdx-js/react": 1.6.22
61116119
"@tsconfig/docusaurus": 1.0.6
61126120
"@types/is-ci": 3.0.0

0 commit comments

Comments
 (0)