Mosaic Mosaic 0.9.4

0003 · variant url strategy

**Status:** Accepted (revised 2026-05-19) **Date:** 2026-05-19

Status: Accepted (revised 2026-05-19) Date: 2026-05-19

Context

Mosaic deploys multiple renderings of the example content. The matrix now ships six variants — three content shapes crossed with two adapters:

A visitor on /demo-blog/blog/hello/ should be able to switch to the Next rendering of the same record, or jump to a different content shape, with one click. The question is what the URL of that other rendering looks like.

Decision

Each variant is its own static build at its own URL prefix. The prefix is the variant slot (demo-single, demo-blog, …); the path after the prefix is the in-site route. The cross-variant switcher lives in the @ssolu/mosaic-devtool Adapter tab (each page injects a <script id="mosaic-sites"> with the six slot URLs). The devtool builds cross-variant links by swapping the prefix while preserving the path:

/demo-blog/blog/hello   ⇆   /demo-blog-next/blog/hello
                                ⇆   /demo-full/blog/hello
                                ⇆   /demo-single/                 (404-tolerant)

No query parameter. No client-side routing — variants are byte-distinct prerenders.

Consequences

Alternatives considered

Cross-references