summaryrefslogtreecommitdiff
path: root/cgithub/public/static
diff options
context:
space:
mode:
authorJoe Mou <dev@mou.fo>2026-09-03 00:08:06 -0400
committerJoe Mou <dev@mou.fo>2026-09-03 01:09:10 -0400
commit4c66a07a995c0d551cd284d6e72826b4f7748bab (patch)
tree35c53f0713a0903ed4c44d53ed17a4f47deaf4af /cgithub/public/static
parent1b9d13fce99b9d798dd604f402699bb47cb1627e (diff)
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013rQG1io1i4GJQW5RFcXNGd
Diffstat (limited to 'cgithub/public/static')
-rw-r--r--cgithub/public/static/style.css21
1 files changed, 19 insertions, 2 deletions
diff --git a/cgithub/public/static/style.css b/cgithub/public/static/style.css
index 157cc15..a83e128 100644
--- a/cgithub/public/static/style.css
+++ b/cgithub/public/static/style.css
@@ -288,7 +288,7 @@ pre.box {
width: fit-content;
}
-.overview, .release {
+.overview, .release, .wiki {
overflow-wrap: break-word;
/* This is a bit convoluted: we want the effect of padding but using margins
@@ -332,7 +332,7 @@ pre.box {
font-weight: bold;
}
-.release > header {
+.release > header, .wiki > header {
display: flex;
align-items: baseline;
> :first-child {
@@ -341,6 +341,23 @@ pre.box {
}
}
+.wiki > footer {
+ /* The wiki's _Footer page is rendered content, not a caption for the page. */
+ font-size: .9rem;
+}
+
+.wiki-pages {
+ summary {
+ cursor: pointer;
+ }
+
+ ul {
+ columns: 16rem;
+ list-style: none;
+ padding: 0;
+ }
+}
+
.timestamp {
white-space: nowrap;
font-size: .8rem;