feat: add custom font
This commit is contained in:
+7
-1
@@ -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,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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 = (() => {
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user