The single site for every Fragiola project: / (the organization), /ui, /dockable, /data-grid, …
Each project lives in its own repo and exposes a site export; this repo checks the exports
against the contract and assembles them into one static Next.js + Fumadocs site, published on
GitHub Pages.
- The contract a project implements:
CONTRACT.md(v1.2). - How this repo works, its rules and commands:
AGENTS.md.
pnpm install
pnpm sources:sync # install and run each project's site:export (projects.json → localPath) into .sources/
pnpm dev # http://localhost:3000, the projects' pages and examples liveprojects.json lists { slug, repo, ref, localPath?, devUrl? }. localPath is the project's
checkout on your machine; with devUrl, pnpm dev starts the project's site:dev there and
proxies /<slug>/embed/** to it, so an edited example hot-reloads inside the site. An edited page
in the project's site/docs shows without a restart, checked against the contract on save.
Without the projects' checkouts, pnpm sources:fixtures fills .sources-fixtures/ from
fixtures/, and FRAGIOLA_SOURCES=.sources-fixtures pnpm dev runs the site on them. pnpm build
never publishes them: it takes .sources/ only, as the last pnpm sources:sync left it, and
refuses it when a project's checkout has changed since.
pnpm build |
the contract checks, then out/ (a broken link fails here, with its file and line) |
pnpm test |
unit tests (the contract checks, the build refusing what it must) |
pnpm e2e:build && pnpm e2e |
the browser suite, against out/ built from the fixtures (pnpm e2e:serve: its @serve tests, served by serve) |
pnpm serve · pnpm measure |
serve out/ like Pages; weigh pages |
.github/workflows/deploy-pages.yml tests (against the fixtures), clones every project at its
ref, runs their exports, builds and publishes. It runs on a push to main, daily at 05:17 UTC,
on demand, and when a project's CI dispatches project-updated. The tests (Biome, TypeScript,
Vitest, the browser suite in shards) and the build run side by side, and the deploy waits for all
of them; a dispatch or the schedule only builds and deploys (www's own code did not change). Only
main deploys: a run on another branch tests and builds. None of it is set up yet; in
order:
-
The repository. Create
fragiola/wwwon GitHub (public, like the projects: the workflow clones them without a token), add it asoriginhere and pushmain. -
Pages. Settings → Pages → Build and deployment → Source: GitHub Actions. Then run the workflow once (Actions → "Deploy site to GitHub Pages" → Run workflow) and check the
github-pagesenvironment it creates. -
The domain. Settings → Pages → Custom domain:
fragiola.com, then Enforce HTTPS once the certificate is issued. At the DNS provider:fragiola.com:Arecords to185.199.108.153,185.199.109.153,185.199.110.153,185.199.111.153(andAAAAto2606:50c0:8000::153,2606:50c0:8001::153,2606:50c0:8002::153,2606:50c0:8003::153);www.fragiola.com:CNAMEtofragiola.github.io.
Verify the domain for the organization first (Organization settings → Pages → Add a domain), so no other account can claim it. With an Actions deployment no
CNAMEfile is needed. The site is served from the domain root: every export is built for/<slug>, so it cannot be served fromfragiola.github.io/www. -
The dispatch token. The projects' CI sends
repository_dispatchproject-updatedafter a push tomainonce aWWW_DISPATCH_TOKENsecret exists (dockable'smaindoes; ui's does onfeat/site-export-v1, not merged yet). Create a fine-grained personal access token (or a GitHub App token) with:- resource owner:
fragiola; repository access: onlyfragiola/www; - repository permissions: Contents: Read and write (what
POST /repos/{owner}/{repo}/dispatchesrequires), Metadata: Read.
Store it as the
WWW_DISPATCH_TOKENActions secret in each project repo (or once as an organization secret shared withuianddockable). Set an expiry and a reminder to rotate it. - resource owner:
-
The refs.
projects.jsonbuildsmainof every project. A project'smainmust export contract v1.2 (project.json→"contract": 1, and the v1.2 rules ofCONTRACT.md), or the build fails on it. -
Search engines (manual, once the domain is live). In Google Search Console, add
https://fragiola.comas a property, verify it (a DNS TXT record on the domain), then submithttps://fragiola.com/sitemap.xmlunder Sitemaps. Bing Webmaster Tools can import it from Search Console. Nothing in this repo does it: no verification token is committed.