Skip to content

Commit 9092457

Browse files
authored
Static hosting of google fonts (#1608)
Close #1607
1 parent dd4f391 commit 9092457

File tree

4 files changed

+50
-1
lines changed

4 files changed

+50
-1
lines changed

assets/build/build.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ const htmlBuild = esbuild.build({
8383
],
8484
loader: {
8585
'.woff2': 'file',
86+
// TODO: Remove when @fontsource/* removes legacy .woff
87+
'.woff': 'file',
8688
},
8789
}).catch(() => process.exit(1))
8890

assets/css/_html.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
@import url('https://fonts.googleapis.com/css?family=Lato:300,700|Merriweather:300italic,300|Inconsolata:400,700');
1+
@import '@fontsource/lato/300.css';
2+
@import '@fontsource/lato/700.css';
3+
@import '@fontsource/merriweather/300.css';
4+
@import '@fontsource/merriweather/300-italic.css';
5+
@import '@fontsource/inconsolata/400.css';
6+
@import '@fontsource/inconsolata/700.css';
27

38
@import 'custom-props/common.css';
49
@import 'custom-props/theme-light.css';

assets/package-lock.json

Lines changed: 39 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
"homepage": "https://github.com/elixir-lang/ex_doc#readme",
2727
"browserslist": "last 2 versions",
2828
"devDependencies": {
29+
"@fontsource/inconsolata": "^4.5.7",
30+
"@fontsource/lato": "^4.5.9",
31+
"@fontsource/merriweather": "^4.5.13",
2932
"esbuild": "^0.15.7",
3033
"eslint": "^8.23.1",
3134
"eslint-config-standard": "^17.0.0",

0 commit comments

Comments
 (0)