diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..97f987f --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,53 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## What this is + +The source for the static website (the pyoomph finite element framework's homepage). There is no site generator framework: pages are produced by `cat`-ing HTML fragments together, with two Python scripts injecting generated sections. + +## Build + +```bash +python -m pip install pybtex pybtex-docutils pillow beautifulsoup4 requests +bash gen_page.sh +``` + +`gen_page.sh` writes into `_generated/` and is the only build step. There are no tests, no linter, and no local dev server — open `_generated/index.html` in a browser to check output (relative paths to `css/` and `media/` resolve correctly from there). + +Deployment is automatic: `.github/workflows/deploy.yml` runs the same commands on every push/PR to `main` and publishes `_generated/` to GitHub Pages via `JamesIves/github-pages-deploy-action`. + +## How pages are assembled + +Every page is `header.html` + body fragments + `footer.html`. Only those two files contain ``/``/`` — all other `*.html` files in the repo root are **fragments** and are invalid standalone HTML. The nav menu lives in `header.html`. + +| Output | Composition | +|---|---| +| `_generated/index.html` | header + `index1.html` + `gen_example_gallery.py` output + `index2.html` + footer | +| `_generated/about.html` | header + `about.html` + `gen_pubs.py` output + footer | +| `_generated/installation.html` | header + `installation.html` + footer | + +Both Python scripts write the HTML snippet to **stdout**; `gen_page.sh` splices it in via process substitution. Any diagnostic printing must go to stderr or it lands in the page. + +## `gen_example_gallery.py` + +Scrapes the tutorial overview table from , downloads each thumbnail, resizes it to 200×150 with Pillow into `_generated/media/tutorial/`, and emits a `