ADR 06: Documentation Hosting (Tangled Sites)
Status: Accepted Date: 2026-04-09
Substratum's documentation is built using VitePress and hosted on Tangled Sites (tngl.sh).
Why Tangled?
Tangled is a federated Git collaboration platform built on the AT Protocol—the exact same identity and authentication protocol that Substratum uses. Hosting our documentation on tngl.sh aligns perfectly with our architectural philosophy of leveraging the AT Protocol ecosystem.
Deployment Architecture
Tangled Sites serves static files directly from a Git branch. We commit the built site under site/ at the repo root.
Local build (every docs edit)
- Trigger: A developer runs
git commitwith staged changes underdocs/(source only; notsite/alone). - Check: The Husky
pre-commithook detects stageddocs/paths. - Build: Runs
pnpm run docs:build(output →site/). - Stamp: Writes
site/.deploy-stamp(ISO time + git revision). - Stage:
git add -f siteso compiled assets are included in the same commit.
Publish to tngl.sh
From the repo root:
pnpm run docs:deploy
git push origin maindocs:deploy rebuilds VitePress, updates .deploy-stamp, stages site/, and commits. Push to main so Tangled redeploys.
Tangled Sites settings
In Settings → Sites for this repository:
| Setting | Value |
|---|---|
| Branch | main |
| Deploy directory | /site |
| Site type | Sub-path site (straiforos.tngl.sh/substratum.cloud) |
VitePress base remains /substratum.cloud/ in docs/.vitepress/config.mts for sub-path URLs.
If the live site is stale after a push, save site settings again or disable and re-enable the site for a full republish.
Configuration Steps (Manual)
To enable this on a new repository on Tangled:
- Go to Settings → Sites in the Tangled repository.
- Choose Index site or Sub-path site (e.g.
yourname.tngl.sh/substratum.cloud). - Set the Branch to
main. - Set the Deploy directory to
/site. - Click Save. The site updates when you push commits that include changes under
site/.
Related
- Root
package.jsonscripts:docs:dev,docs:build,docs:deploy scripts/docs-deploy.mjs— deploy stamp and stagingdocs/.vitepress/config.mts— sidebar; update when adding pages