forrest-mims-library/site/astro.config.mjs
Ryan Malloy b892189f21 Add SEO infrastructure: sitemap, OG meta, JSON-LD, custom 404
- Integrate @astrojs/sitemap for automatic sitemap generation
- Add robots.txt with sitemap reference
- Add Open Graph and Twitter Card meta tags to Layout
- Add canonical URL and structured data slot to Layout
- Add JSON-LD schema (WebSite, CollectionPage, Book, BreadcrumbList)
- Create custom 404 page with navigation links
- Create default OG image (SVG with graph-paper theme)
- Wire SITE_URL through Docker build args for production builds
- Update Caddyfile for proper 404 handling instead of SPA fallback
2026-02-13 07:32:57 -07:00

25 lines
585 B
JavaScript

// @ts-check
import { defineConfig } from 'astro/config';
import react from '@astrojs/react';
import sitemap from '@astrojs/sitemap';
import tailwindcss from '@tailwindcss/vite';
// https://astro.build/config
export default defineConfig({
integrations: [react(), sitemap()],
// Production site URL for correct link generation
site: process.env.SITE_URL || 'https://mims.l.supported.systems',
// Disable telemetry and devToolbar
telemetry: false,
devToolbar: { enabled: false },
vite: {
plugins: [tailwindcss()],
server: {
host: '0.0.0.0',
}
}
});