From df2969f6ff3658d683ae1959a7e4dbdb25720e2e Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Thu, 3 Sep 2026 00:08:06 -0400 Subject: Render repository wikis Wikis are one of the last parts of GitHub still served as plain Rails HTML, with no embedded JSON to read, so this scrapes the markup: a page and any older revision of it, the _Sidebar and _Footer a wiki can define, and the page index. Every page is already in the sidebar of every page, since the "Show N more pages" button only unhides the rest, so linking the whole wiki costs no second request. Routes mirror GitHub's and resolve in its order, so an underscore name reserved for its own actions (_pages, _history, _new, _edit) can never be mistaken for a page; the ones we don't serve fall through to the usual redirect. A slug reaches us decoded and has to be encoded again rather than interpolated the way a ref is, or a page named C# would truncate at the fragment. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_013rQG1io1i4GJQW5RFcXNGd --- CLAUDE.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CLAUDE.md') diff --git a/CLAUDE.md b/CLAUDE.md index 0ef4b47..c0c211d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -33,6 +33,9 @@ pnpm test - `GET /:owner/:repo` - Repository info with directory listing - `GET /:owner/:repo/tree/:branch/:path*` - Directory listing - `GET /:owner/:repo/blob/:branch/:path` - File content view +- `GET /:owner/:repo/wiki` - Wiki home page +- `GET /:owner/:repo/wiki/:page` - Wiki page (also `/:page/:oid` for a revision) +- `GET /:owner/:repo/wiki/_pages` - Wiki page index ## Instructions -- cgit v1.3.1