feat: let a site render its xhtmlmp/html output as a Mews Profile page
All checks were successful
CI / check (push) Successful in 48s
CI / release (push) Successful in 6m48s

A new mews_profile site setting switches the XHTML-MP 1.2 doctype, the
conformance marker, the viewport tag and the default stylesheet link, and
drops raw HTML passthrough and off-site or data: images that the profile's
permitted-element list cannot vouch for.
This commit is contained in:
randogoth 2026-10-11 08:22:52 +03:00
parent 1b47145522
commit c9bde15f5c
9 changed files with 357 additions and 70 deletions

View file

@ -42,6 +42,8 @@ site = "smol"
HTTP and Spartan route by the hostname the request carries, falling back to `default_site`; Nex and Gopher carry none, so their listener names one site outright. Every format a listener serves must be compiled in, which `--check` reports. A `.itsybitsy.toml` in a content directory sets rendering options for that directory — `[defaults]` for all its Markdown files, `[page."name.md"]` for one — with no inheritance from parent directories. Editing it re-renders on the next request.
A site can set `mews_profile = true` to render its `xhtmlmp` and `html` output as [Mews Profile](https://mews.page/spec/) pages: the XHTML-MP 1.2 doctype, the conformance marker, the viewport tag and the default stylesheet link, with raw HTML and off-site or `data:` images dropped rather than passed through. Sites sharing one root must agree on this setting, since they share one render cache.
### Formats and protocols
| Format | Served as | Behind feature |