File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// @ts -check
22import { satteri } from "@astrojs/markdown-satteri" ;
33import starlight from "@astrojs/starlight" ;
4- import { defineConfig } from "astro/config" ;
4+ import { defineConfig , fontProviders } from "astro/config" ;
55
66import { satteriRelativeMarkdownLinks } from "@system76/satteri-relative-markdown-links" ;
77import { viteStaticCopy } from "vite-plugin-static-copy" ;
@@ -65,10 +65,39 @@ export default defineConfig({
6565 } ,
6666 } ,
6767 routeMiddleware : "./src/plugins/toc-formatting-middleware.ts" ,
68+ components : {
69+ Head : "./src/components/Head.astro" ,
70+ } ,
6871 } ) ,
6972 ] ,
7073 base,
7174 site,
75+ fonts : [
76+ {
77+ provider : fontProviders . fontsource ( ) ,
78+ name : "Fira Sans" ,
79+ cssVariable : "--font-fira-sans" ,
80+ weights : [ 400 , 700 ] ,
81+ styles : [ "normal" ] ,
82+ subsets : [ "latin" ] ,
83+ } ,
84+ {
85+ provider : fontProviders . fontsource ( ) ,
86+ name : "Roboto Slab" ,
87+ cssVariable : "--font-roboto-slab" ,
88+ weights : [ 400 , 700 ] ,
89+ styles : [ "normal" ] ,
90+ subsets : [ "latin" ] ,
91+ } ,
92+ {
93+ provider : fontProviders . fontsource ( ) ,
94+ name : "Ubuntu Mono" ,
95+ cssVariable : "--font-ubuntu-mono" ,
96+ weights : [ 400 ] ,
97+ styles : [ "normal" ] ,
98+ subsets : [ "latin" ] ,
99+ } ,
100+ ] ,
72101 image : {
73102 service : {
74103 entrypoint : "./src/avifImageService.mjs" ,
Original file line number Diff line number Diff line change 11: root {
22 --sl-content-width : 47rem ;
33
4+ /* Brand typography, migrated from the old Nuxt site's @system76/design fonts. */
5+ --sl-font : var (--font-fira-sans ), var (--sl-font-system );
6+ --sl-font-mono : var (--font-ubuntu-mono ), var (--sl-font-system-mono );
7+ --sl-heading-font : var (--font-roboto-slab ), serif;
8+
9+ /* Match code block/inline code font size to body text (Starlight defaults them smaller). */
10+ --sl-text-code : var (--sl-text-body );
11+ --sl-text-code-sm : var (--sl-text-body );
12+
413 /* Dark mode colors. */
514 --sl-color-accent-low : # 0c292c ;
615 --sl-color-accent : # 007883 ;
Original file line number Diff line number Diff line change 1+ ---
2+ import Default from " @astrojs/starlight/components/Head.astro" ;
3+ import { Font } from " astro:assets" ;
4+ ---
5+
6+ <Default />
7+ <Font cssVariable =" --font-fira-sans" preload />
8+ <Font cssVariable =" --font-roboto-slab" />
9+ <Font cssVariable =" --font-ubuntu-mono" />
You can’t perform that action at this time.
0 commit comments