Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -80,41 +80,6 @@ export default defineConfig({
["meta", { property: "og:image:type", content: "image/png" }],
],

transformHead: (cfg) => {
const abcDiaBold = cfg.assets.find(() => /ABCDiatype-Bold\.\w+\.woff2/);
const abcDiaLight = cfg.assets.find(() => /ABCDiatype-Light\.\w+\.woff2/);

if (abcDiaBold) {
cfg.head.push(
[
'link',
{
rel: 'preload',
href: abcDiaBold,
as: 'font',
type: 'font/woff2',
crossorigin: ''
}
]
);
}

if (abcDiaLight) {
cfg.head.push(
[
'link',
{
rel: 'preload',
href: abcDiaLight,
as: 'font',
type: 'font/woff2',
crossorigin: ''
}
]
);
}
},

themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: nav(),
Expand Down
19 changes: 6 additions & 13 deletions .vitepress/theme/fonts.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
@font-face {
font-family: 'ABC Diatype';
font-weight: bold;
src: url('/fonts/ABCDiatype-Bold.woff2') format("font-woff2");
}
@import '@fontsource-variable/geist/index.css';

@font-face {
font-family: 'ABC Diatype';
src: url('/fonts/ABCDiatype-Light.woff2') format("font-woff2");
:root {
--vp-font-family-base: 'Geist Variable', ui-sans-serif, system-ui, sans-serif;
--vp-font-family-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

:root {
--vp-font-family-base: 'ABC Diatype', ui-sans-serif, system-ui, sans-serif;
/* normal text font */
--vp-font-family-mono: 'ABC Diatype', monospace;
/* code font */
:where(h1, h2, h3, h4, h5, h6, .VPHero .name, .VPHero .text) {
font-family: 'ABC Diatype', 'Geist Variable', ui-sans-serif, system-ui, sans-serif;
}
Loading
Loading