Render any GitHub markdown file or gist as a clean, scientific-paper-style article.
Take any GitHub URL, replace github.com with stig.sh, and you get a typeset, single-column, Computer Modern–set rendering — the same content, but legible end to end. Works for README.mds, RFC drafts, gists, multi-file gists, and entire repositories.
| Source | stig |
|---|---|
github.com/foo/bar |
stig.sh/foo/bar |
github.com/foo/bar/blob/main/docs/x.md |
stig.sh/foo/bar/blob/main/docs/x.md |
raw.githubusercontent.com/foo/bar/main/x.md |
stig.sh/foo/bar/main/x.md |
gist.github.com/alice/<id> |
stig.sh/alice/<id> |
The shorthand <owner>/<repo> (e.g. stig.sh/wevm/stig.sh) resolves to the default branch's README.
stig accepts the full GitHub-flavoured Markdown surface plus a few extensions for scientific writing.
You can write italics, bold, both, strikethrough, inline code, and links — including autolinks and reference links.
A footnote1 anchors at the bottom of the document.
Unordered, ordered, and task lists nest naturally:
- Renders any GitHub markdown
- …including private repos if you proxy the request yourself
- …and gists, single-file or multi-file
- Adds a sidebar for repos that ship a
stig.json - Adds a table of contents for long documents
- Paste a URL
- Read it
- Share it
- GitHub-flavoured tables
- Mermaid diagrams
- LaTeX-style math
- Your idea here
"If you can't explain it simply, you don't understand it well enough." — attributed to Einstein, probably wrongly
GitHub-style alerts pass through to typed callout blocks:
Note
stig is purely a renderer. It never writes to GitHub, never stores your content, and caches rendered HTML by commit SHA in Cloudflare KV.
Tip
Drop a stig.json at your repo root to set a custom title, description, and sidebar.
Important
Renders are immutable per commit. To force a re-render, push a new commit.
Warning
Non-markdown files (e.g. LICENSE, source code) redirect to github.com — stig only renders .md, .mdx, and .markdown.
Caution
Anonymous GitHub API access is rate-limited to 60 req/h per IP. Set GITHUB_TOKEN in production.
| Feature | Library | Notes |
|---|---|---|
| Markdown parser | remark |
with remark-gfm, remark-math |
| HTML pipeline | rehype |
with custom plugins for alerts & links |
| Syntax highlighting | shiki |
JS regex engine, github-light theme |
| Math | katex |
inline and display |
| Diagrams | mermaid |
client-side, with click-to-zoom |
Fenced code blocks are highlighted with Shiki:
import * as Source from '#/lib/Source.js'
const source = Source.parse('wevm/stig.sh')
if (source) {
console.log(Source.toPath(source))
}def stigify(url: str) -> str:
return url.replace("github.com", "stig.sh")# Render any repo from the command line
curl -sL https://stig.sh/wevm/stig.shstig pipes math through KaTeX. Inline math like
Mermaid blocks render client-side and open in a zoom modal on click:
flowchart LR
A[github.com URL] -->|host swap| B[stig.sh URL]
B --> C{kind?}
C -->|repo| D[fetch README]
C -->|file| E[fetch contents]
C -->|gist| F[fetch gist API]
D & E & F --> G[remark → rehype]
G --> H[KV cache by SHA]
H --> I((Rendered article))
sequenceDiagram
participant U as You
participant S as stig.sh (CF Worker)
participant K as KV Cache
participant G as GitHub API
U->>S: GET /wevm/stig.sh
S->>K: lookup HTML by SHA
alt cache hit
K-->>S: HTML
else cache miss
S->>G: fetch README + commit SHA
G-->>S: markdown
S->>S: render
S->>K: put HTML
end
S-->>U: HTML
Images render with intrinsic dimensions and click-to-zoom:
GitHub's <picture> dark-mode variants are flattened to the light source so the page stays consistent with stig's own typography.
Drop a stig.json at your repository root to customise the rendering:
{
"title": "My Project",
"description": "A short, plain-text summary used for OG meta + the page title.",
"sidebar": [
{ "text": "Introduction", "path": "README.md" },
{ "text": "Architecture", "path": "docs/architecture.md" },
{ "text": "Contributing", "path": "CONTRIBUTING.md" }
]
}All fields are optional. Without sidebar, the article renders edge-to-edge. With it, the listed files become a fixed left rail (≥1240px) or a collapsible header on smaller screens.
Footnotes
-
Footnotes are rendered as numbered citations, with backlinks to the cite site. ↩