feat: add custom font
test-build / guarddog (push) Successful in 1m14s
test-build / build (push) Successful in 1m56s

This commit is contained in:
2026-05-21 16:22:19 -05:00
parent 34e39aca23
commit c7493ad09c
3 changed files with 14 additions and 1 deletions
+7 -1
View File
@@ -1,4 +1,4 @@
import { defineConfig } from 'astro/config'; import { defineConfig, fontProviders } from 'astro/config';
import node from '@astrojs/node'; import node from '@astrojs/node';
import sitemap from '@astrojs/sitemap'; import sitemap from '@astrojs/sitemap';
@@ -55,6 +55,12 @@ export default defineConfig({
}), }),
], ],
fonts: [{
provider: fontProviders.fontsource(),
name: "Geologica",
cssVariable: "--font-base",
}],
markdown: { markdown: {
syntaxHighlight: false, syntaxHighlight: false,
}, },
+4
View File
@@ -1,4 +1,6 @@
--- ---
import { Font } from "astro:assets";
import { readSingleton } from '@directus/sdk'; import { readSingleton } from '@directus/sdk';
import BaseHead from '@components/BaseHead.astro'; import BaseHead from '@components/BaseHead.astro';
@@ -38,6 +40,8 @@ const normalizeTitle = !title ? global.name : `${title} | ${global.name}`;
structuredData={structuredData} structuredData={structuredData}
/> />
<Font cssVariable="--font-base" />
<!-- Set Theme --> <!-- Set Theme -->
<script is:inline> <script is:inline>
const theme = (() => { const theme = (() => {
+3
View File
@@ -61,6 +61,9 @@
--radius-markdown-img: 0.5rem; --radius-markdown-img: 0.5rem;
/* Font */
--font-sans: var(--font-base);
/* Reveal Animations */ /* Reveal Animations */
--animate-reveal: reveal 0.8s ease forwards; --animate-reveal: reveal 0.8s ease forwards;
--animate-reveal-fade: reveal-fade 1.8s ease forwards; --animate-reveal-fade: reveal-fade 1.8s ease forwards;