Versioned previews
Because content is addressed by commit, the site can render any version of your docs on demand. Prefix a URL and you're browsing another branch or commit — no build, no deploy, no separate preview environment.
| Mode | URL pattern | Content |
|---|---|---|
| Branch | /tree/:branch/<page> | Latest content commit on the branch (follows new pushes) |
| Commit | /blob/:sha/<page> | That exact commit, immutable |
For example, this very page on the main branch lives at /tree/main/concepts/versioned-previews.
How it works
A preview isn't a filtered view of production — it's a full content instance built from that version's files. The navigation tree, search index, and every internal link are rebuilt from the previewed commit and prefixed with the version base, so you browse a coherent snapshot. A page that only exists on your branch is fully navigable there.
Branch previews resolve the branch to its latest content commit on request, so refreshing a /tree/ URL after a push shows the new content. Commit previews are immutable and cached accordingly.
What previews are for
- Reviewing content PRs — share a
/tree/my-branchlink instead of asking reviewers to run the site. Pair it with the PR preview comment action to get links posted automatically. - Checking history — the version history panel (keyboard shortcut
gthenh, on any docs page) lists the commits that touched the current page and links each one to its/blob/preview. - Debugging — pin a report to an exact commit with an immutable
/blob/<sha>URL.
Good to know
- Previews are public, like the rest of the site, but send
noindexrobots headers and canonicalize to the production URL — they won't compete with your real pages in search. - The raw Markdown mirrors work in previews too:
/tree/my-branch/raw/<page>.md. - "Edit this page on GitHub" targets the previewed branch on
/tree/pages, and is disabled on/blob/pages since a commit can't be edited. - Preview instances are kept in a small LRU pool per server instance; evicted versions rebuild on demand, and their parsed pages survive in the per-SHA cache.