feat: add design system, theme toggle, SEO head and base layout
- Huemint Magazine tokens for light/dark themes with AA-safe accent variants - FOUC-free theme init + toggle (localStorage, follows OS until chosen) - Seo component (canonical, OG, Twitter, WebSite/Person JSON-LD) - Header with popover mobile menu, 4-column footer with social links - Container, GridLines, SectionHeading, Button, Badge, Card, ExternalLink - site.json / social.json validated with zod - dev-only /styleguide preview Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+15
-5
@@ -7,6 +7,20 @@ import sitemap from '@astrojs/sitemap';
|
||||
import node from '@astrojs/node';
|
||||
import icon from 'astro-icon';
|
||||
|
||||
/**
|
||||
* Dev-only routes (style preview); never part of a production build.
|
||||
* @type {import('astro').AstroIntegration}
|
||||
*/
|
||||
const devRoutes = {
|
||||
name: 'dev-routes',
|
||||
hooks: {
|
||||
'astro:config:setup': ({ command, injectRoute }) => {
|
||||
if (command !== 'dev') return;
|
||||
injectRoute({ pattern: '/styleguide', entrypoint: './src/dev/Styleguide.astro' });
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
site: 'https://ta1sph.info',
|
||||
@@ -14,11 +28,7 @@ export default defineConfig({
|
||||
// Static by default; only routes with `export const prerender = false` (view counter API) run on the server.
|
||||
output: 'static',
|
||||
adapter: node({ mode: 'standalone' }),
|
||||
integrations: [
|
||||
mdx(),
|
||||
sitemap({ filter: (page) => !page.includes('/_styleguide/') }),
|
||||
icon({ include: { tabler: ['*'] } }),
|
||||
],
|
||||
integrations: [mdx(), sitemap(), icon({ include: { tabler: ['*'] } }), devRoutes],
|
||||
vite: {
|
||||
plugins: [tailwindcss()],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user