# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Development Commands - **Start Dev Server**: `npm run dev` - **Build Site**: `npm run build` - **Local Preview**: `npm run preview` (Uses Wrangler to simulate Cloudflare environment) - **Deploy**: `npm run deploy` (Builds and deploys to Cloudflare Pages) - **Type Check & Deploy Dry-run**: `npm run check` - **Generate Types**: `npm run types` (Generates Wrangler/Cloudflare types) ## Architecture & Structure This is an **Astro 5** project configured for **Cloudflare Pages/Workers (SSR)**. ### Core Structure - `src/content/`: Content collections for blog posts. Schema-driven via Astro's Content Layer. - `src/pages/`: File-based routing. Includes `.astro`, `.md`, and `.mdx` files. - `src/components/`: Reusable Astro components. - `src/layouts/`: Global page wrappers. - `wrangler.json`: Cloudflare Pages configuration. - `astro.config.mjs`: Astro configuration using the `@astrojs/cloudflare` adapter. ### Technology Stack - **Framework**: Astro (SSR Mode) - **Deployment**: Cloudflare Pages - **Styling**: Standard CSS (within Astro components) - **Content**: MDX, Markdown - **Language**: TypeScript (Strict mode) ### Key Patterns - **Content Collections**: Use `getCollection('blog')` to fetch content. - **SSR**: The project is configured for server-side rendering on Cloudflare Workers. - **Wrangler**: Used for local simulation of Cloudflare features and deployment.