77 lines
1.7 KiB
JavaScript
77 lines
1.7 KiB
JavaScript
import { defineConfig, fontProviders } from 'astro/config'
|
|
|
|
import keystatic from '@keystatic/astro'
|
|
|
|
import node from '@astrojs/node'
|
|
import react from '@astrojs/react'
|
|
|
|
const devOnly = (integration) => ({
|
|
name: `${integration.name}:dev-only`,
|
|
hooks: {
|
|
'astro:config:setup': async (params) => {
|
|
if (params.command !== 'dev') return
|
|
await integration.hooks['astro:config:setup']?.(params)
|
|
},
|
|
},
|
|
})
|
|
|
|
export default defineConfig({
|
|
site: 'https://dave-dmg.de',
|
|
integrations: [react(), devOnly(keystatic())],
|
|
|
|
adapter: node({
|
|
mode: 'standalone',
|
|
}),
|
|
fonts: [
|
|
{
|
|
provider: fontProviders.google(),
|
|
name: 'Geist',
|
|
cssVariable: '--font-geist',
|
|
},
|
|
{
|
|
provider: fontProviders.google(),
|
|
name: 'Geist Mono',
|
|
cssVariable: '--font-geist-mono',
|
|
},
|
|
{
|
|
provider: fontProviders.google(),
|
|
name: 'Blaka',
|
|
cssVariable: '--font-blaka',
|
|
weights: [400],
|
|
},
|
|
{
|
|
provider: fontProviders.local(),
|
|
name: 'Julia Mono',
|
|
cssVariable: '--font-julia-mono',
|
|
options: {
|
|
variants: [
|
|
{
|
|
src: ['./src/assets/fonts/JuliaMono/JuliaMono-Regular.woff2'],
|
|
weight: 400,
|
|
style: 'normal',
|
|
},
|
|
{
|
|
src: ['./src/assets/fonts/JuliaMono/JuliaMono-Bold.woff2'],
|
|
weight: 700,
|
|
style: 'normal',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
provider: fontProviders.local(),
|
|
name: 'Unigrim Dee',
|
|
cssVariable: '--font-unigrim',
|
|
options: {
|
|
variants: [
|
|
{
|
|
src: ['./src/assets/fonts/UnigrimDee-Regular.woff2'],
|
|
weight: 400,
|
|
style: 'normal',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
],
|
|
})
|