heartwood every commit a ring

Add CLAUDE.md with project guidance for Claude Code

d982877d by Isaac Bythewood · 1 month ago

Add CLAUDE.md with project guidance for Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
added CLAUDE.md
@@ -0,0 +1,39 @@# CLAUDE.mdThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.## What This IsA personal blog (blog.bythewood.me) built as a Flask app that renders markdown files. No database — blog posts are `.md` files in `content/posts/` with YAML frontmatter. Uses WeasyPrint for PDF export and Mistune for markdown rendering.## Commands- **Dev server:** `make run` (runs Vite watch + Flask dev server concurrently)- **Build frontend:** `make build` (or `bun run build`)- **Docker build:** `sudo docker build .`There are no tests or linters configured.## Architecture**Backend:** Single-file Flask app (`app.py`). Posts are loaded from `content/posts/*.md` at startup (reloaded per-request in debug mode). Each post has frontmatter fields: title, slug, date, publish_date, tags, description, cover_image. Posts with `publish_date` in the future are hidden.**Frontend pipeline:** Vite builds `static_src/` → `static/`. Entry point is `static_src/index.js` which imports SCSS and JS. Output is `static/base.css` and `static/base.js`. Uses Bootstrap 5, CodeMirror (syntax highlighting in posts), and Monaspace Argon font.**Templates:** Jinja2 templates in `templates/`. `base.html` is the layout. Blog post content is rendered through a custom `BlogRenderer` (Mistune) that wraps blocks in `div.block-*` classes. A separate `PDFRenderer` exists for the PDF export route.**Content:** `content/posts/` for markdown posts, `content/images/` for images served at `/content/images/`.## Tooling- **Python deps:** managed with `uv` (see `pyproject.toml`, `uv.lock`)- **JS deps:** managed with `bun` (see `package.json`, `bun.lock`)- **Production:** Docker (Alpine-based) + Gunicorn, deployed via `docker-compose`## Key Routes- `/blog/<slug>/` — single post- `/blog/<slug>/pdf/` — PDF export via WeasyPrint- `/blog/<slug>/md/` — raw markdown download- `/search/live/` — JSON endpoint for live search- `/og/<slug>.svg` — dynamic OG image generation