This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
npm run serve # Local dev server with live reload (http://localhost:8080)
npm run build # Production build → _site/
npm run watch # Watch and rebuild without server
npm run debug # Build with full DEBUG logging
Requires Node >= 22 (see .nvmrc).
This is a static site built with Eleventy (11ty) and deployed to Netlify. Output goes to _site/.
Two Eleventy config files exist:
eleventy.config.js — primary config (plugins, filters, passthrough copies).eleventy.js — older config with markdown-it setup and some filters; both are loadedContent collections:
posts/ — blog posts (weeknotes, articles) tagged in frontmatterwork/ — portfolio case studies (UK government projects).md/.html files at root level are standalone pagesTemplates: Nunjucks (.njk) in _includes/layouts/ and _includes/partials/. Layout hierarchy is base.njk → content-specific layouts.
Data layer:
_data/metadata.json — site-wide config (title, URL, author, social links)_data/spotify.js — fetches live Spotify currently-playing data via Axios at build time; requires SPOTIFY_* env vars in .envCSS: Plain CSS split across css/ files; no preprocessor or bundler. css/main.css is the primary stylesheet.
Client JS: Minimal — js/theme-switch.js (dark/light mode toggle) and js/compound-calc.js (a calculator tool).
Spotify page (spotify.html) uses Firebase for real-time data alongside the build-time _data/spotify.js fetch.
Copy .env.example to .env (if present) or create .env with Spotify API credentials for the Spotify integration to work during build.