This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
npm start # Start dev server with auto-open (gatsby develop -o)
npm run build # Build production site
npm run serve # Serve production build locally
npm run lint # Run ESLint
npm run lint:fix # Auto-fix linting issuesmake help # Show all available commands
make dev # Start development server
make build # Build production site
make test # Run lint + build verification
make clean # Remove .cache and public directories
make fresh # Clean everything and reinstallThis is a Gatsby 5 static site that generates:
- Blog posts from MDX files in
src/blog/ - Category pages dynamically created for each tag
- Static pages in
src/pages/
-
gatsby-node.js (Build-time Page Generation):
- Creates dynamic routes for blog posts at
/[slug] - Creates category pages at
/categories/[category] - Calculates
timeToReadfor each post (200 words/min) - Generates slugs from post titles using kebab-case
- Provides
prev/nextpost context for navigation
- Creates dynamic routes for blog posts at
-
wrap-root-element.js (MDX Configuration):
- Wraps app with MDXProvider
- Maps MDX
preelements to customCodecomponent - Enables syntax highlighting via prism-react-renderer
-
Templates (
src/templates/):post.js- Individual blog post pagescategory.js- Category listing pages
Blog Post Format:
- Location:
src/blog/YYYY-MM-DD - Title/index.mdx - Frontmatter required:
date: 'YYYY-MM-DD' title: 'Post Title' categories: - Category1 - Category2
- Optional: Custom
slugin frontmatter (auto-generated from title if omitted)
SEO Component (src/components/SEO.js):
- Handles Open Graph tags (Facebook, LinkedIn, Threads)
- Twitter/X card metadata
- Schema.org JSON-LD structured data (WebPage, Article, BreadcrumbList)
- Configuration in
src/config/website.js
Gatsby Head API:
- Uses
export const Headpattern (Gatsby 5+) - SEO component used in Head exports across pages/templates
- No react-helmet dependency
- styled-components for all styling
- Theme configuration in
src/config/theme.js - Global styles injected via
Layoutcomponent - Responsive breakpoints defined in theme
src/components/- Shared components (Layout, Header, Wrapper, SEO, Button)src/components/blog/- Blog-specific components (Article, PrevNext, SectionTitle, Subline)src/components/index.js- Central export barrel
- gatsby-config.js - Plugins, site metadata, MDX processing
- src/config/website.js - Site-wide settings (title, URL, social handles, analytics)
- src/config/theme.js - Design tokens and responsive breakpoints
- gatsby-node.js - Dynamic page creation and field generation
- ci.yml - Runs on PRs only (lint + build verification)
- release.yml - Runs on master pushes (creates releases with build artifacts)
- Handles all deploys (preview on PRs, production on master)
- Static site generation via Gatsby build
- Preview URLs for every PR
- Node 22.x required (specified in GitHub Actions workflows)
- Use
npm cifor reproducible CI builds - Use
npm installfor local development