mirror of
https://github.com/bitbaum/sites.git
synced 2026-12-03 19:26:58 +01:00
* feat: import a sitekit repo, export a site as its own repo, compare any two renders loki ADR-0001 build steps 4, 8 and 9 (tooling half). - scripts/import-repo.ts + import-theme.ts: read a sitekit consumer's content module and globals.css into spec + theme + settings. Text tokens below WCAG AA move to the nearest passing shade, each change reported (camille: fg-muted 3.15→4.53:1, accent 3.94→4.54:1, nothing else). - scripts/export-site.ts + export/template: a site bundle becomes a static Next repo with the exact sitekit the engine pins, the engine's own stylesheet and font copier (copied, one source), one git commit per version, and its own verify. Refuses a bundle it could not render, and never writes over a directory. - scripts/compare-renders.mjs: render pages from two bases at 390/834/1440 (with --map to fetch a real host from a local port) and exit 1 on any difference a visitor would notice. Measured 2026-11-20: live camille repo vs the engine serving its imported row, and the engine vs camille's export built to static files — no differences on any page at any width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: a site's free address answers 308 to its verified own domain The apex before www, path kept, method and body kept (308, as apps do). Checked locally: camille.orangecat.ch/catering → 308 https://camille.example/catering once the domain is verified, both hosts serve, the ask approves the domain, and removing the row restores the free address. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: contact forms — the first block with a server half, in the engine and in exports loki ADR-0001 build step 11, block 1. sitekit's new `form` section posts to /_sites/forms: - src/lib/forms.ts (shared by the engine and every export): only a form that exists on the named page is read, only its own fields, length-capped; a filled honeypot answers "sent" and is dropped; the owner's mail is plain text with reply-to the visitor; problems are worded in the site's language. - The engine route resolves the site by Host, never sends from the preview host, rate-limits five per visitor per site per ten minutes keyed on the LAST X-Forwarded-For hop (a forged first hop is still limited), mails settings.formTo through @bitbaum/mail-kit, and answers 303 with a RELATIVE Location (an absolute one built from req.url sent visitors to the loopback origin — caught locally, guarded by a test). - Export: a site with a form becomes a small standalone server with the same forms.ts and route, mailing through the owner's own provider; a site without one stays static files. Checked locally against camille with a form: every outcome (missing, bad email, unknown form, honeypot, delivery failure without a mail key, sixth message busy, forged first hop busy, preview never sends), the page notices, 390px layout (no sideways scroll, 44px button, honeypot off-screen), and compare-renders engine vs export (server variant and static variant): no differences. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: booking requests through the same form route; pin sitekit with map, gallery and card actions forms.ts checks date (YYYY-MM-DD), time (HH:MM) and people (1–50), words the problems in the site's language, and puts them in the owner's mail. sitekit is pinned to the kits commit that adds the gallery, map and card-action blocks, so the engine renders them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: pin sitekit with the map control fix Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>