# Preview Versions

> Preview documentation at a branch, commit or pull request without changing production. Use when debugging content on /tree/:branch, /blob/:sha or /pr/:number, or explaining how ISR and GitHub-pinned content work.

- Skill: `comarkdown/preview-versions` (Agent Skill)
- Install (CLI): `npx skillmds@latest add comarkdown/preview-versions`
- Raw SKILL.md: https://api.skillmd.com/api/skills/comarkdown/preview-versions/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: comarkdown (https://skillmd.com/u/comarkdown)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/comarkdown/preview-versions

---


# Preview versions

Content is served at request time. Production is pinned to a commit SHA; any branch, commit or pull request can be previewed through versioned URLs.

| Mode | URL | Content |
| --- | --- | --- |
| prod | `/getting-started/introduction` | pinned production SHA |
| tree | `/tree/main/getting-started/introduction` | latest commit touching the content directory |
| blob | `/blob/<sha>/getting-started/introduction` | immutable commit |
| pr | `/pr/<number>/getting-started/introduction` | the PR's head commit (follows new pushes) |

Commit and PR previews are authorized: a `/blob/` SHA must be in production history or belong to a PR (same-repo, or a fork PR carrying the `preview:enabled` label), and `/pr/` applies the same rule. Unauthorized refs answer 404.

Raw markdown mirrors exist at `/raw/**` for production pages only — preview pages serve HTML.

Two cache tiers: ISR-cached page HTML at the edge, and a per-parser-version, per-content-SHA runtime cache for parsed Markdown bodies. A GitHub push to the production branch hits `/api/revalidate` and purges ISR.

Keyboard shortcut `g` `h` toggles the version-history panel on a docs page.

Read more: [Architecture](/concepts/architecture), [Versioned previews](/concepts/versioned-previews).

