Phase 6 part 5, step 1: a shared site theme

internal/theme embeds a Hugo theme from federated-website's look and the
13 section types both sites share, with the header, footer, colors, font
and logo set per site in hugo.toml, and a README of each type's fields.
The catalogue reader reads themes' sections and READMEs after the site's
own; lead forms know a theme site needs only the Lead Capture address.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-22 15:14:24 -07:00
co-authored by Claude Opus 5.5
parent 98913971ea
commit 5d7db5c5bf
36 changed files with 2641 additions and 79 deletions
+42 -4
View File
@@ -1375,10 +1375,48 @@ shared theme for new sites (deferred in Phase 5).
item 1: the second app's keys, choosing the page, and posting as the
page or the profile per draft. Built against LinkedIn's documented API;
used for real once LinkedIn approves the app.
5. **New sites from a shared theme.** A Hugo theme of sections common to
federated-website and webcoredesktop, and creating a new site from it:
a new Gitea repository, a first set of pages built by Part 3 of Phase 5,
and a preview. Planned in detail when it starts.
5. **New sites from a shared theme.** Decided with the user (2026-11-22):
the theme is *copied into* each new site (`themes/supermarket/`), not a
submodule, so each site stands alone; *the user creates* the empty
Gitea repository (the `write:repository` token stays enough); the theme
has *federated-website's look*, with each site's colors, fonts and logo
as settings. In three steps, a commit after each:
1. **The theme**, embedded in Supermarket: base layouts, header and
footer, the section types both sites share (hero, text, features,
cards, steps, checklist, split, stats, table, faq, callout,
final-cta) plus federated-website's lead `form`, the stylesheet with
brand variables, and a README documenting each type and its fields
(which the catalogue reader and the page builder then use).
2. **A new site**: Sites → New site takes the empty repository, the
site's address, name and brand (colors, font, logo); the first
commit (the theme, `hugo.toml`, a starter home page) goes straight to
the empty repository's `main`, the one exception to "always a pull
request", since there's nothing published yet; then the site is added
to the profile, read, and previewed, and its first pages (home,
about, a product page, contact with a lead form) are built with the
page builder as pull requests.
3. **Theme updates**: the theme carries a version; a site whose copy is
older gets a pull request copying the new one in.
**Step 1 built (2026-11-22; no schema change).** `internal/theme` embeds
the theme (version 1): federated-website's base layout (its reveal and
sticky-header script; not its agent view or pricing script), a generic
head (title, description, canonical and Open Graph tags, favicon, the
brand font from Google Fonts, Plausible when `[params.plausible]` is
set), a header and footer driven by `hugo.toml` (logo or the site's
name, `main` menu with dropdowns, `[params.header] ctas`, footer
groups, social and legal menus, copyright), the 13 shared section types
(the hero without Federated's layer panel; the form posting through
`supermarket-leads.js`, now the theme's file and the one Part 3 uses),
pages that render sections then any Markdown body, a 404, and the
stylesheet with every brand color as a variable (the fixed violet,
lime and navy tints turned into `color-mix` of the brand variables).
`[params.brand]` sets dark, dark2, primary, accent (and hovers), font,
logo and favicon. The README documents each type's real fields; the
catalogue reader now reads `themes/*/` sections and READMEs after the
site's own (the site's win), and treats types `render-sections` picks
by name as types even before a page uses them; Lead forms knows a theme
site needs only the address. Tested with Hugo building every section.
**Part 1 built (2026-11-22; no schema change).** `internal/backup` makes
backups with `VACUUM INTO` (to a `.part` file, then renamed; mode 0600)