Cedwyn library

Add a section

A new web app on its own branch, with its own data, reachable from the header selector.

A section is added without touching any other section. Worked example: nft-art, The Garden Gallery, a gallery of digital editions made from non-human images held in the Wayback Vault records. It was added on 27 Oct 2026 as section 41.

Steps

  1. Pick an id. Lower-case, unique in themes.json, used as the path: nft-art → /nft-art/.
  2. Create the branch. A new branch with no shared history (an orphan commit) holding the web app in public/: index.html, garden.css, garden.js. Layout and behaviour only: the files carry no words and no records.
  3. Give it its own database. public/_db/section.sqlite with the records and meta tables (see Federation). For nft-art: one words row with every interface string, and 12 artwork rows (NFA-0001 to NFA-0012) with title, caption, edition, price, image, alt text, the catalogue path and sha256 of the source image, and the buy link. Keep a text dump beside it (db/section.sql) so changes are readable in a diff, and a section.json (id, title, database path, version).
  4. Point at core records, do not copy them. Each artwork names the core artifact it was made from (its catalogue path and sha256). The source images were read from the core database's chunks, not from a page or another repository.
  5. Register it. One entry appended to themes.json on main, through a pull request labelled site-wide:
    { "id": "nft-art", "title": "The Garden Gallery", "cy": "Oriel yr Ardd", "es": "La Galería del Jardín",
      "live": "https://cedwyn.bucklerfamily.estate/nft-art/", "hosts": [], "paths": [],
      "branch": "nft-art", "dir": "public", "group": "interactive" }
    The entry's position in the list is its position in the header selector; the selector wraps, so the last stop is also one step left of the first.
  6. Build. The merge starts build-cedwyn. The branch is copied to /nft-art/, its images enter the core catalogue as blobs, its database rows are merged into section_records, the header selector gains the new stop, and the export writes /db/export/sections/nft-art.json.gz.
  7. Read the data at run time. The page loads /_cedwyn/cat.js and runs SELECT kind, id, data FROM section_records WHERE theme = 'nft-art' ORDER BY seq. Hash routes give each record its own view (#/NFA-0005).
  8. Check. Open /nft-art/ at phone width, step through the header selector to reach it, and query SELECT count(*) FROM section_records WHERE theme = 'nft-art'.

Selling from a section

Buy buttons are payment links held in the section's records and opened through the site's outbound route (/wayback/go/?u=…), the same route the e-book buttons use. Delivery happens on the payment provider's confirmation page. Nothing on the static site handles payment.

After that

  • Changes to the section are pushes to its own branch; the next build picks them up. Nothing on main changes.
  • To take the section out, remove its entry from themes.json; the branch and its database stay.
  • To run it as a standalone site later, point a separate Pages project at the same branch and folder; its database travels with it.