- Created a new post on Image Voice Memos detailing a macOS app for browsing photos and recording voice memos with automatic transcription. - Added a guide for Initial VPS Setup on Debian covering system updates, user creation, and SSH hardening. - Introduced a post on caching webmention avatars locally at build time to enhance privacy and comply with CSP. - Documented the implementation of security headers for an Astro site behind Caddy, focusing on GDPR compliance and CSP. - Set up a Forgejo Actions runner for self-hosted CI/CD, detailing the installation and configuration process for automated deployments.
71 lines
No EOL
1.9 KiB
JavaScript
71 lines
No EOL
1.9 KiB
JavaScript
// @ts-check
|
|
|
|
import mdx from '@astrojs/mdx';
|
|
import sitemap from '@astrojs/sitemap';
|
|
import { defineConfig, fontProviders } from 'astro/config';
|
|
import { loadEnv } from 'vite';
|
|
import avatarCacheSweep from './src/integrations/avatar-cache-sweep';
|
|
|
|
const envMode = process.env.NODE_ENV === 'production' ? 'production' : 'development';
|
|
const envVars = loadEnv(envMode, process.cwd(), '');
|
|
const WEBMENTION_TOKEN = envVars.WEBMENTION_TOKEN || process.env.WEBMENTION_TOKEN || '';
|
|
|
|
// https://astro.build/config
|
|
export default defineConfig({
|
|
site: 'https://adrian-altner.de',
|
|
|
|
vite: {
|
|
define: {
|
|
'globalThis.__WEBMENTION_TOKEN__': JSON.stringify(WEBMENTION_TOKEN),
|
|
},
|
|
},
|
|
|
|
devToolbar: {
|
|
enabled: false,
|
|
},
|
|
|
|
i18n: {
|
|
defaultLocale: 'de',
|
|
locales: ['de', 'en'],
|
|
routing: {
|
|
prefixDefaultLocale: false,
|
|
redirectToDefaultLocale: false,
|
|
},
|
|
},
|
|
|
|
integrations: [
|
|
mdx(),
|
|
sitemap({
|
|
i18n: {
|
|
defaultLocale: 'de',
|
|
locales: { de: 'de-DE', en: 'en-US' },
|
|
},
|
|
}),
|
|
avatarCacheSweep(),
|
|
],
|
|
|
|
fonts: [
|
|
{
|
|
provider: fontProviders.local(),
|
|
name: 'Maple Mono',
|
|
cssVariable: '--font-maple-mono',
|
|
fallbacks: ['ui-monospace', 'SFMono-Regular', 'Menlo', 'monospace'],
|
|
options: {
|
|
variants: [
|
|
{
|
|
src: ['./src/assets/fonts/MapleMono[wght]-VF.woff2'],
|
|
weight: '100 800',
|
|
style: 'normal',
|
|
display: 'swap',
|
|
},
|
|
{
|
|
src: ['./src/assets/fonts/MapleMono-Italic[wght]-VF.woff2'],
|
|
weight: '100 800',
|
|
style: 'italic',
|
|
display: 'swap',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
],
|
|
}); |