2.1 KiB
2.1 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
Astro 5 blog with Cloudflare Pages deployment. Uses PNPM as package manager.
Commands
pnpm dev # Start dev server at localhost:4321
pnpm build # Build production site to ./dist/
pnpm preview # Build and preview locally via Wrangler
pnpm deploy # Build and deploy to Cloudflare Pages
pnpm cf-typegen # Generate Wrangler types for Cloudflare bindings
Architecture
Content System
- Blog posts in
src/content/blog/as Markdown/MDX files - Content schema defined in
src/content.config.tswith Zod validation - Required frontmatter:
title,description,pubDate - Optional frontmatter:
updatedDate,heroImage
Routing
src/pages/- File-based routingsrc/pages/blog/[...slug].astro- Dynamic blog post routessrc/pages/rss.xml.js- RSS feed endpoint
Components
src/components/BaseHead.astro- SEO metadata, og:image, Twitter cardssrc/layouts/BlogPost.astro- Blog post layout templatesrc/consts.ts- Site title and description constants
Styling
- Tailwind CSS via Vite plugin
- Design tokens in
src/styles/global.cssas CSS custom properties - Current accent color:
#2337ff(blue) - Max content width: 720px
Cloudflare Integration
- Adapter:
@astrojs/cloudflarewith platform proxy enabled - Wrangler config:
wrangler.jsonc - Environment types:
src/env.d.ts - Node.js compatibility enabled via
nodejs_compatflag
Design Specification
design.json contains V7 Industrial Dark Mode system specification (not yet implemented):
- Dark mode native with
#0B0D11primary background - Orange/yellow accent
#FFB84Cfor CTAs - Brutalist/industrial aesthetic with visible grid structure
- Heavy typography emphasis
Key Configuration
- Site URL: Currently
https://example.cominastro.config.mjs- update for production - Project name:
nicholai-work-2026inwrangler.jsonc - TypeScript: Strict mode with Astro and Cloudflare Worker types