mirror of
https://github.com/prdlk/leetcode.git
synced 2026-11-02 13:12:44 +00:00
build(config): switch to local Fontsource fonts for offline Blume builds
This commit is contained in:
1 parent
bf0ac34a43
commit
717feb7f70
3 files changed
+34
No files matched your search
@@ -1,5 +1,24 @@
|
|||||||
import { defineConfig } from "blume";
|
import { defineConfig } from "blume";
|
||||||
|
|
||||||
|
// Blume's defaults (`inter`, `ibm-plex-mono`) are fetched from fonts.gstatic.com
|
||||||
|
// on every build, which has timed out on the Pages runner and, fully offline,
|
||||||
|
// silently ships no fonts at all. The same two families from Fontsource, as
|
||||||
|
// local files, keep the build network-free. Blume resolves `src` from this
|
||||||
|
// directory; the workspace links these packages under ./node_modules.
|
||||||
|
const inter = {
|
||||||
|
name: "Inter",
|
||||||
|
variants: [
|
||||||
|
{ src: "./node_modules/@fontsource-variable/inter/files/inter-latin-wght-normal.woff2", weight: "100..900" },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
const plexMono = {
|
||||||
|
name: "IBM Plex Mono",
|
||||||
|
variants: [
|
||||||
|
{ src: "./node_modules/@fontsource/ibm-plex-mono/files/ibm-plex-mono-latin-400-normal.woff2", weight: 400 },
|
||||||
|
{ src: "./node_modules/@fontsource/ibm-plex-mono/files/ibm-plex-mono-latin-500-normal.woff2", weight: 500 },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
title: "Leetcode",
|
title: "Leetcode",
|
||||||
description: "Documentation for LeetCode solutions",
|
description: "Documentation for LeetCode solutions",
|
||||||
@@ -11,6 +30,9 @@ export default defineConfig({
|
|||||||
content: {
|
content: {
|
||||||
root: "content",
|
root: "content",
|
||||||
},
|
},
|
||||||
|
theme: {
|
||||||
|
fonts: { display: inter, body: inter, mono: plexMono },
|
||||||
|
},
|
||||||
navigation: {
|
navigation: {
|
||||||
sidebar: {
|
sidebar: {
|
||||||
display: "flat", // "flat" | "group" | "page"
|
display: "flat", // "flat" | "group" | "page"
|
||||||
|
|||||||
@@ -11,5 +11,9 @@
|
|||||||
"blume": "^2.0.1",
|
"blume": "^2.0.1",
|
||||||
"react": "^19.2.8",
|
"react": "^19.2.8",
|
||||||
"react-dom": "^19.2.8"
|
"react-dom": "^19.2.8"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@fontsource-variable/inter": "^5.3.0",
|
||||||
|
"@fontsource/ibm-plex-mono": "^5.3.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -33,6 +33,10 @@
|
|||||||
"react": "^19.2.8",
|
"react": "^19.2.8",
|
||||||
"react-dom": "^19.2.8",
|
"react-dom": "^19.2.8",
|
||||||
},
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@fontsource-variable/inter": "^5.3.0",
|
||||||
|
"@fontsource/ibm-plex-mono": "^5.3.0",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
"apps/videos": {
|
"apps/videos": {
|
||||||
"name": "videos",
|
"name": "videos",
|
||||||
@@ -296,6 +300,10 @@
|
|||||||
|
|
||||||
"@eslint/plugin-kit": ["@eslint/plugin-kit@0.2.8", "", { "dependencies": { "@eslint/core": "^0.13.0", "levn": "^0.4.1" } }, "sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA=="],
|
"@eslint/plugin-kit": ["@eslint/plugin-kit@0.2.8", "", { "dependencies": { "@eslint/core": "^0.13.0", "levn": "^0.4.1" } }, "sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA=="],
|
||||||
|
|
||||||
|
"@fontsource-variable/inter": ["@fontsource-variable/inter@5.3.0", "", {}, "sha512-OupL48va4JNofb97w6NYeF9S7W/kHNKM0Er8Dem5nqi4jeOLrVJDoE8tZEpnMJmtkvNbB1EIPPwHcdkF6b1oUA=="],
|
||||||
|
|
||||||
|
"@fontsource/ibm-plex-mono": ["@fontsource/ibm-plex-mono@5.3.0", "", {}, "sha512-eTgnZjZEGk1QtD3ZstF+Vclo2HLAni8YMy34/DxllwZvyz1lR/1RF/xTiAquOBO7MvqBx8D2Ig2WCPMVfdZu7Q=="],
|
||||||
|
|
||||||
"@hono/node-server": ["@hono/node-server@2.1.1", "", { "peerDependencies": { "hono": "^4" } }, "sha512-ELuehkj5VCBdgEw9zs+ivkKwyzzUCSQuE96YmiPvn1ECBoZCczbFXJLeEGMTYjphP6gydh4pHMqEYPVMYUVgQg=="],
|
"@hono/node-server": ["@hono/node-server@2.1.1", "", { "peerDependencies": { "hono": "^4" } }, "sha512-ELuehkj5VCBdgEw9zs+ivkKwyzzUCSQuE96YmiPvn1ECBoZCczbFXJLeEGMTYjphP6gydh4pHMqEYPVMYUVgQg=="],
|
||||||
|
|
||||||
"@humanfs/core": ["@humanfs/core@0.19.2", "", { "dependencies": { "@humanfs/types": "^0.15.0" } }, "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA=="],
|
"@humanfs/core": ["@humanfs/core@0.19.2", "", { "dependencies": { "@humanfs/types": "^0.15.0" } }, "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA=="],
|
||||||
|
|||||||
Reference in new issue
Block a user