Standalone Astro 6 site in /site (decoupled from the /web app monorepo): landing page, /blog with one post (Content Layer), and terms/privacy/cookie legal pages. Pure Astro, server-rendered to static HTML. - Static by default via @astrojs/vercel adapter; any route can opt into SSR with `export const prerender = false` (deploys as a Vercel Function). - SPA-style navigation with <ClientRouter />, transition:persist on the header (no icon flash), and viewport prefetch — ~6 KB gzip JS, no React. - Deploy on Vercel by setting Root Directory to 'site' (no vercel.json needed). See site/README.md for dev and deploy instructions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
15 lines
500 B
TypeScript
15 lines
500 B
TypeScript
import { defineCollection, z } from 'astro:content';
|
|
import { glob } from 'astro/loaders';
|
|
|
|
// Content Layer API (Astro 5+). Markdown files live in src/content/blog/.
|
|
// NOTE: this config file is src/content.config.ts — NOT src/content/config.ts.
|
|
const blog = defineCollection({
|
|
loader: glob({ pattern: '**/*.md', base: './src/content/blog' }),
|
|
schema: z.object({
|
|
title: z.string(),
|
|
description: z.string(),
|
|
pubDate: z.coerce.date(),
|
|
}),
|
|
});
|
|
|
|
export const collections = { blog };
|