Turn audit.py into a run() function and drop audit_run.py, which only existed to import it quietly. Remove unused parameters, keys, helpers and imports from draw.py, manifest.py and stl_build.py, and the source file names in stl_build.FILES that pointed at nothing. Keep the brow strip's taper and knob positions in geom.py only. Correct comments and docstrings that disagreed with the code, and the README's claim about counts. The page changes only in markup: no stray spaces in class attributes, and three CSS declarations that did nothing are gone. Guide HTML, templates and print files are byte-identical apart from that. Credibility pass over a7c04e5..HEAD; the next one can scope from here. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
3.9 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
Kestrel's Builds is a static site of craft build write-ups. Builds vary (foam and printed parts, paint techniques, sewing, electronics), so each one ships a guide plus whatever files that project needs. The index must not promise templates or print files for every build. The site itself is static with no backend. A build's page may be generated from a source folder (<build>-src/), which lives in this repo but is never deployed.
Live URL: https://builds.kestrelsnest.social
File Structure
index.html- Site index (HTML/CSS in one file, no JavaScript). One<a class="build">card per build, newest first; the newest also has classfirst(full-width card).og.png- OpenGraph image for the index, 1200 x 630favicon.svg- Icon shared by every pagedeploy- Rsync deployment script<build>/- One folder per build, self-contained:index.html,img/,dl/greenman/- Green Man mask (generated; do not edit by hand)
<build>-src/- Generator for a build whose page is generated. Excluded from deploy by the*-src/rule.greenman-src/- Green Man kit source; see itsREADME.md
Conventions
- Each build folder is self-contained and uses relative links, so it works at any path.
- The index is a sister page to Kestrel's Hall (gamehall.kestrelsnest.social): the same dark ink / bone / gold tokens, the same serif stack, the same card and section structure. Keep them in step.
- Every build page links back to the index with
<a href="../">at its top and bottom (.homeingreenman/index.html). - Downloads live in
<build>/dl/. Zip files there are part of the site, so*.zipis deliberately NOT in.gitignore. - Everything in
greenman/is generated bygreenman-src/: runuv run build.pythere and it rewritesgreenman/index.html,img/,dl/andog-image.jpg. Never hand-editgreenman/; change the source and rebuild. The back links, favicon line, description, canonical and Open Graph tags are all written bygreenman-src/build_web.py. deploymust never upload a generator. Any new source folder must be named<build>-src/so the existing exclude covers it; check with./deploy -n.- Keep the apostrophe in the index's
<meta name="description">written as'. It is deliberate: the opengraph.xyz preview checker cut the description off at a plain apostrophe. - Share previews:
og.pngat the root is a 1200x630 screenshot of the top of the index, so retake it when the index's first card changes. Each build has its ownog-image.jpg(1200x630) in its folder and its own description and Open Graph tags.
Adding a build
README.md has the full steps. In short:
- Create
<name>/index.htmlwith itsimg/anddl/, the two back links, the favicon link, and its own description, canonical and Open Graph tags with anog-image.jpg. - Add a card to the top of the list in the top-level
index.htmland move the classfirstto it. - Retake
og.png. ./deploy -n, then./deploy.
Development
python3 -m http.server 8000
Then open http://localhost:8000.
Deployment
The deploy script uses rsync to push to YunoHost (a My Webapp static app, like pantry):
./deploy -n # dry run, changes nothing
./deploy # push
Important deployment notes:
DIRindeployis/var/www/my_webapp__3/www, this app's web root on the server.- rsync runs with
--delete: anything on the server that is not in this folder is removed. Do not keep server-only files in the web root. HOST=socialis an SSH config alias, the same one pantry uses.
OpenGraph
Meta tags in the index <head> point to https://builds.kestrelsnest.social/og.png, and each build page points to its own og-image.jpg. If the URL changes, update og:image, og:url and canonical on every page.