showcase
- v0.2.4
- 37 commits
- 1 branch
- 6 tags
- updated
- CI 2/2
fix: proxy header allowlist, git concurrency cap, capped user text, container limits
Showing 34 changed files with 307 additions and 95 deletions.
deploy/compose.yaml
+8 −0
@@ -20,6 +20,14 @@ services:2020 security_opt:2121 - no-new-privileges:true222223 # a flood of clones or a runaway build stays inside these. Builds hold24 # blobs up to 50 MB plus git's own memory; raise mem_limit if a build25 # gets OOM-killed (docker inspect shows OOMKilled=true).26 mem_limit: 512m27 memswap_limit: 512m28 cpus: "1.0"29 pids_limit: 256302331 networks:2432 - holonet2533
docs/decisions.md
+8 −0
@@ -876,3 +876,11 @@ repo-a's six documents and 1,202px for all eleven kinds.876876 desktop. On hover a tab's icon lights up and a faint underline shows, so877877 icon-only tabs read as clickable. Phones still scroll both rows with the878878 edge fade.879880## Second security review881882Details in `docs/security.md`. The decisions: the proxy forwards an883allowlist of request headers instead of stripping a denylist; git proxying884is capped at 8 concurrent requests (503 beyond); registry blobs are always885downloads; issue, pull and comment bodies are cut at 32 KB and threads show886their newest 100 comments.
docs/security.md
+52 −5
@@ -7,10 +7,10 @@ enforces it and the test that proves it. Run them all with `just test`.7788| # | Rule | Enforced in | Tested by |99|---|------|-------------|-----------|10| 1 | Generator uses no token, so it can only see public data | `gitea.Client` never sets credentials and refuses redirects. `gitx` runs git with no prompt, no credential helper, no user config and http(s) only. A repo the API marks private is refused anyway. | `fakeGitea` fails any request that carries `Authorization` or `Cookie`; `TestOutputIsSafe` |10| 1 | Generator uses no token, so it can only see public data (one exception: an optional token for the package listing) | `gitea.Client` sets credentials only on the package listing (`tokenPath`), refuses redirects, and the builder keeps only packages linked to repos that loaded anonymously. `gitx` runs git with no prompt, no credential helper, no user config and http(s) only. A repo the API marks private is refused anyway. | `fakeGitea` fails any request that carries `Authorization` or `Cookie`; `TestOutputIsSafe`; `TestTokenOnlyForPackages`, `TestTokenNotFollowedOnRedirect` |1111| 2 | One allowlist (`config.json`) | Builder iterates `cfg.Repos`. Proxy checks `HasRepo` / `HasImage`. Packages are filtered to allowlisted repos and images. | `TestSiteGolden` (missing and private repos absent), `TestProxyRoutes` (unlisted repo and image) |1212| 3 | Router default is 404, with only the listed routes | `server.route` and `proxyRoute`. Dot segments, `//`, `\` and NUL are refused before any file lookup. | `TestRoutes`, `TestProxyRoutes` |13| 4 | Realm rewrite, strip `Set-Cookie` and Gitea headers, no client `Authorization`/`Cookie` on git | `newProxy` Rewrite and ModifyResponse. Non-Bearer challenges are dropped too, so git never prompts. | `TestProxyRoutes`, `TestProxyResponses` |13| 4 | Realm rewrite, strip `Set-Cookie` and Gitea headers, no client `Authorization`/`Cookie` on git | `newProxy` Rewrite and ModifyResponse. Only `forwardHeaders` reach Gitea, so headers it might trust (`X-WEBAUTH-USER`) can't be injected. Non-Bearer challenges are dropped too, so git never prompts. | `TestProxyRoutes`, `TestProxyResponses`, `TestProxyDropsHeaders` |1414| 5 | Safe rendering | goldmark; raw HTML is never passed through, only rebuilt from an allowlist of tags and attributes (`htmlRenderer`), with links and images resolved like Markdown's and only http(s)/mailto hrefs; dangerous URLs blanked, `html/template` everywhere, highlighter escapes every token, 512 KB / binary limits, README images relative or https only | `TestSiteGolden` (forbidden strings), `TestOutputIsSafe` (no `<script`, inline `style=` or `on*=` in any page), `TestReadmeHTML` (script, handlers, styles, `javascript:`, stray closes) |1515| 6 | Security headers; raw never rendered as HTML | `route` sets the CSP, `nosniff` and `no-referrer` on every response. `raw` serves allowed images, `text/plain` or an attachment. Release assets are always attachments. | `TestRoutes` (headers on every case, raw SVG and HTML are `text/plain`), `TestProxyResponses` |1616| 7 | Container: non-root, read-only, no caps, no-new-privileges, only `/data` writable | `Dockerfile` (`USER 10001`, `HOME=/data`), `deploy/compose.yaml` | `hadolint`; container not yet run (see open items) |@@ -47,11 +47,51 @@ enforces it and the test that proves it. Run them all with `just test`.4747- Repo SVGs on `raw/` stay `text/plain` even though `/static` serves our own4848 icons as `image/svg+xml` (covered by `TestRoutes`).494950## Second review (2026-11-23)5152After issues, comments and the package token. Read through the server,53proxy, rendering, git wrappers, builder, registry client, config, scripts,54Dockerfile and compose file.5556Fixed:5758- **Request headers to Gitea are an allowlist** (`forwardHeaders`). The59 proxy used to pass everything except `Cookie` and some `Authorization`.60 If Gitea ever had reverse-proxy login on (`X-WEBAUTH-USER`), a visitor61 could have claimed to be you. `TestProxyDropsHeaders`.62- **At most 8 concurrent git requests** go through the proxy; more get a63 503 with `Retry-After`. Upload-pack is the expensive call for Gitea, and64 anyone can start one. `TestProxyGitSlots`.65- **Registry blobs are served as downloads** (`application/octet-stream`,66 attachment), like release assets, so no layer can render as a page on67 this origin.68- **Text from strangers is capped.** Comments mean anyone with a Gitea69 account can put text on the site. Issue, pull and comment bodies are cut70 at 32 KB and a thread shows its newest 100 comments, saying how many it71 left out. `TestUserTextLimits`.7273Checked and fine: path handling (dot segments, `//` and NUL refused; tree74entries with `.`/`..`/empty segments skipped; only regular files served; no75open redirect through `base_path`), the HTML allowlist (`javascript:`76through entities, control characters or leading spaces fails URL parsing77and is dropped; the CSP blocks inline script anyway), git invocations78(`--end-of-options`, literal pathspecs, no prompts or helpers, http(s) only,79bare mirrors so no submodule or checkout hooks), registry layer reading80(64 MB compressed, 16 KB per file, streamed, 30 s timeout), the token (never81logged, never in config.json, never sent elsewhere), and the scripts82(`theme.js` only accepts `[a-z]+` from the cookie).835084## Accepted risks518552- PR and release bodies can embed https images (the CSP allows `img-src53 https:`). Those are tracking-pixel capable, but it's your own repos'54 content.86- Issue, pull, comment and release bodies can embed https images (the CSP87 allows `img-src https:`). With comments, that includes strangers'88 tracking pixels; `no-referrer` hides the page, not the visitor's IP.89- Anyone with a Gitea account can write issues and comments that show up90 here (sanitized and capped). Gitea is tailnet-only with sign-ups off, so91 that's only accounts you create.92- README headings get automatic `id`s, so a heading could share an id with93 a page element. The page's own elements come first, so `copy.js` still94 finds them; the worst case is a mis-scrolled anchor.5595- A repo with a file `x` and a directory `x.html` side by side makes its blob5696 pages collide, and the build fails. It only affects your own repos and5797 shows up as a build error, never as wrong content.@@ -64,3 +104,10 @@ enforces it and the test that proves it. Run them all with `just test`.641042. `docker pull daum.dev/daniel/<image>` through Pangolin and Cloudflare.651053. Open pages in a browser and confirm there are no CSP console errors.661064. Check Gitea's settings allow anonymous reads (`REQUIRE_SIGNIN_VIEW = false`).1075. `govulncheck` v1.10.0 on 2026-11-23 (Go 1.27.4, goldmark 1.8.7, chroma108 2.27.0): no vulnerabilities found. Run it again before each release109 (`go run golang.org/x/vuln/cmd/govulncheck@latest ./...`; older110 releases crash on Go 1.27's standard library), and rebuild the image111 for new Go, Alpine and git releases (`just digests`).1126. Compose now sets `mem_limit`/`memswap_limit` 512m, `cpus` 1.0 and113 `pids_limit` 256. Watch the first builds for an OOM kill.
internal/build/extra.go
+35 −13
@@ -4,6 +4,7 @@ import (44 "context"55 "html/template"66 "net/url"7 "strings"7889 "daum.dev/showcase/internal/gitea"910 "daum.dev/showcase/internal/gitx"@@ -20,12 +21,14 @@ type PullView struct {2021 gitea.PullRequest2122 Body template.HTML2223 Thread []CommentView24 Hidden int // older comments left out (maxThread)2325}24262527type IssueView struct {2628 gitea.Issue2729 Body template.HTML2830 Thread []CommentView31 Hidden int2932}30333134type CommentView struct {@@ -51,18 +54,37 @@ type ExtraPage struct {5154 Refs []gitx.Ref5255}535654// thread renders the comments on issue or pull n. Comments are Markdown55// from anyone, so they go through the same allowlist as READMEs.56func thread(r *repo, n int, base string) ([]CommentView, error) {57// Limits on text anyone with a Gitea account can write: a body longer58// than maxUserText is cut, and a thread shows its newest maxThread59// comments. They keep a spammer from turning one page into megabytes.60const (61 maxUserText = 32 << 1062 maxThread = 10063)6465// userMarkdown renders Markdown from issues, pulls and comments. It goes66// through the same allowlist as READMEs; the cap keeps pages small.67func userMarkdown(s, base string) (template.HTML, error) {68 if len(s) > maxUserText {69 s = strings.ToValidUTF8(s[:maxUserText], "") + "\n\n*(cut: too long to show here)*"70 }71 return render.Markdown([]byte(s), base, "")72}7374// thread renders the newest maxThread comments on issue or pull n and75// says how many older ones it left out.76func thread(r *repo, n int, base string) ([]CommentView, int, error) {77 cs := r.Comments[n]78 hidden := max(0, len(cs)-maxThread)5779 var out []CommentView58 for _, c := range r.Comments[n] {59 body, err := render.Markdown([]byte(c.Body), base, "")80 for _, c := range cs[hidden:] {81 body, err := userMarkdown(c.Body, base)6082 if err != nil {61 return nil, err83 return nil, 0, err6284 }6385 out = append(out, CommentView{c, body})6486 }65 return out, nil87 return out, hidden, nil6688}67896890// renderExtras writes the releases, issues, pulls and packages pages from API and@@ -90,28 +112,28 @@ func (b *Builder) renderExtras(ctx context.Context, rd *render.Renderer, dir str9011291113 pulls := ExtraPage{Repo: r, Tab: "pulls"}92114 for _, x := range r.Pulls {93 body, err := render.Markdown([]byte(x.Body), base, "")115 body, err := userMarkdown(x.Body, base)94116 if err != nil {95117 return err96118 }97 th, err := thread(r, x.Number, base)119 th, hidden, err := thread(r, x.Number, base)98120 if err != nil {99121 return err100122 }101 pulls.Pulls = append(pulls.Pulls, PullView{x, body, th})123 pulls.Pulls = append(pulls.Pulls, PullView{x, body, th, hidden})102124 }103125104126 issues := ExtraPage{Repo: r, Tab: "issues"}105127 for _, x := range r.Issues {106 body, err := render.Markdown([]byte(x.Body), base, "")128 body, err := userMarkdown(x.Body, base)107129 if err != nil {108130 return err109131 }110 th, err := thread(r, x.Number, base)132 th, hidden, err := thread(r, x.Number, base)111133 if err != nil {112134 return err113135 }114 issues.Issues = append(issues.Issues, IssueView{x, body, th})136 issues.Issues = append(issues.Issues, IssueView{x, body, th, hidden})115137 if x.State == "open" {116138 issues.Open++117139 } else {
internal/build/extra_test.goadded
+32 −0
@@ -0,0 +1,32 @@1package build23import (4 "strconv"5 "strings"6 "testing"78 "daum.dev/showcase/internal/gitea"9)1011// TestUserTextLimits: a flood of comments or one huge body stays small.12func TestUserTextLimits(t *testing.T) {13 r := &repo{Comments: map[int][]gitea.Comment{}}14 for i := range maxThread + 5 {15 r.Comments[1] = append(r.Comments[1], gitea.Comment{Body: "c" + strconv.Itoa(i)})16 }17 th, hidden, err := thread(r, 1, "/repo-a")18 if err != nil {19 t.Fatal(err)20 }21 if len(th) != maxThread || hidden != 5 || !strings.Contains(string(th[len(th)-1].Body), "c"+strconv.Itoa(maxThread+4)) {22 t.Errorf("thread kept %d, hid %d; want the newest %d and 5 hidden", len(th), hidden, maxThread)23 }2425 h, err := userMarkdown(strings.Repeat("é", maxUserText), "/repo-a") // two bytes each: the cut lands mid-rune26 if err != nil {27 t.Fatal(err)28 }29 if len(h) > maxUserText+200 || !strings.Contains(string(h), "cut: too long") {30 t.Errorf("long body rendered to %d bytes", len(h))31 }32}
internal/server/proxy.go
+31 −4
@@ -7,11 +7,24 @@ import (77 "net/http/httputil"88 "net/url"99 "regexp"10 "slices"1011 "strings"1112 "time"1213)131414const maxUploadPack = 10 << 2015const (16 maxUploadPack = 10 << 2017 maxGitProxied = 8 // concurrent clones and fetches; more get a 50318)1920// forwardHeaders are the only request headers that reach Gitea. Anything21// else (cookies, proxy-auth headers like X-WEBAUTH-USER, X-Forwarded-*,22// Gitea's own X-Gitea-*) is dropped, so a visitor can't speak to Gitea as23// anyone but an anonymous client.24var forwardHeaders = []string{25 "Accept", "Accept-Encoding", "Content-Type", "Content-Encoding", "Git-Protocol",26 "User-Agent", "Range", "If-Range", "If-None-Match", "If-Modified-Since", "Authorization",27}15281629var (1730 realmRe = regexp.MustCompile(`realm="[^"]*"`)@@ -31,7 +44,11 @@ func (s *Server) newProxy() *httputil.ReverseProxy {3144 pr.Out.URL.Path, pr.Out.URL.RawPath = pr.In.Context().Value(upstreamPath{}).(string), ""3245 pr.SetURL(up)3346 pr.Out.Host = up.Host34 pr.Out.Header.Del("Cookie")47 for k := range pr.Out.Header {48 if !slices.Contains(forwardHeaders, http.CanonicalHeaderKey(k)) {49 pr.Out.Header.Del(k)50 }51 }3552 // only the registry's own (anonymous) bearer tokens pass, never credentials3653 a := pr.In.Header.Get("Authorization")3754 if !strings.HasPrefix(pr.In.URL.Path, "/v2/") || pr.In.URL.Path == "/v2/token" || !strings.HasPrefix(a, "Bearer ") {@@ -58,8 +75,8 @@ func (s *Server) newProxy() *httputil.ReverseProxy {5875 } else {5976 h.Del("Www-Authenticate")6077 }61 if strings.Contains(resp.Request.URL.Path, "/releases/download/") {62 // uploaded assets could be anything, including HTML78 if strings.Contains(resp.Request.URL.Path, "/releases/download/") || strings.Contains(resp.Request.URL.Path, "/blobs/") {79 // uploaded assets and image layers could be anything, including HTML6380 h.Set("Content-Type", "application/octet-stream")6481 h.Set("Content-Disposition", "attachment")6582 }@@ -132,6 +149,16 @@ func (s *Server) proxyRoute(w http.ResponseWriter, r *http.Request) bool {132149 http.NotFound(w, r)133150 return true134151 }152 if strings.HasSuffix(first, ".git") { // upload-pack is the expensive one for Gitea153 select {154 case s.gitSlots <- struct{}{}:155 defer func() { <-s.gitSlots }()156 default:157 w.Header().Set("Retry-After", "30")158 http.Error(w, "busy, try again shortly", http.StatusServiceUnavailable)159 return true160 }161 }135162 s.proxy.ServeHTTP(w, r.WithContext(context.WithValue(r.Context(), upstreamPath{}, target)))136163 return true137164}
internal/server/proxy_test.go
+50 −0
@@ -9,6 +9,7 @@ import (99 "os"1010 "os/exec"1111 "path/filepath"12 "slices"1213 "strings"1314 "testing"1415)@@ -256,3 +257,52 @@ func TestProxyRoutesIgnoreBasePath(t *testing.T) {256257 }257258 }258259}260261// TestProxyDropsHeaders: only forwardHeaders reach Gitea, so headers Gitea262// might trust (reverse-proxy auth, its own X-Gitea-*) can't be injected.263func TestProxyDropsHeaders(t *testing.T) {264 u := &upstream{}265 s := proxyServer(t, u, true)266 req := httptest.NewRequest("GET", "/repo-a.git/info/refs?service=git-upload-pack", nil)267 for k, v := range map[string]string{268 "X-WEBAUTH-USER": "daniel", "X-Forwarded-User": "daniel", "X-Gitea-OTP": "1", "Cookie": "i_like_gitea=1",269 "Authorization": "Basic ZGFuaWVsOnB3", "Proxy-Authorization": "Basic eA==", "Git-Protocol": "version=2",270 } {271 req.Header.Set(k, v)272 }273 s.ServeHTTP(httptest.NewRecorder(), req)274 if len(u.got) != 1 {275 t.Fatalf("upstream got %d requests", len(u.got))276 }277 for k := range u.got[0].Header {278 if !slices.Contains(forwardHeaders, k) {279 t.Errorf("header %s reached Gitea", k)280 }281 }282 if u.got[0].Header.Get("Authorization") != "" {283 t.Error("credentials reached Gitea on a git route")284 }285 if u.got[0].Header.Get("Git-Protocol") != "version=2" {286 t.Error("Git-Protocol was dropped; protocol v2 clones need it")287 }288}289290// TestProxyGitSlots: past maxGitProxied concurrent git requests, more get291// a 503 instead of piling onto Gitea.292func TestProxyGitSlots(t *testing.T) {293 s := proxyServer(t, &upstream{}, true)294 for range maxGitProxied {295 s.gitSlots <- struct{}{}296 }297 w := httptest.NewRecorder()298 s.ServeHTTP(w, httptest.NewRequest("GET", "/repo-a.git/info/refs?service=git-upload-pack", nil))299 if w.Code != http.StatusServiceUnavailable || w.Header().Get("Retry-After") == "" {300 t.Errorf("full slots: got %d", w.Code)301 }302 <-s.gitSlots303 w = httptest.NewRecorder()304 s.ServeHTTP(w, httptest.NewRequest("GET", "/repo-a.git/info/refs?service=git-upload-pack", nil))305 if w.Code != http.StatusOK {306 t.Errorf("free slot: got %d", w.Code)307 }308}
internal/server/server.go
+3 −1
@@ -31,10 +31,12 @@ type Server struct {3131 Ready func() bool3232 Log *slog.Logger3333 proxy *httputil.ReverseProxy34 // gitSlots caps concurrent git proxy requests at maxGitProxied35 gitSlots chan struct{}3436}35373638func New(cfg *config.Config, root func() string, ready func() bool, log *slog.Logger) *Server {37 s := &Server{Cfg: cfg, Root: root, Ready: ready, Log: log}39 s := &Server{Cfg: cfg, Root: root, Ready: ready, Log: log, gitSlots: make(chan struct{}, maxGitProxied)}3840 s.proxy = s.newProxy()3941 return s4042}
testdata/golden/index.html
+3 −3
@@ -21,9 +21,9 @@2121<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">2222<link rel="manifest" href="/static/favicon/site.webmanifest">2323<link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml">24<link rel="stylesheet" href="/static/style.css?v=4cca5f59d7">25<script src="/static/theme.js?v=4cca5f59d7"></script>26<script src="/static/copy.js?v=4cca5f59d7" defer></script>24<link rel="stylesheet" href="/static/style.css?v=4efc1d0ff1">25<script src="/static/theme.js?v=4efc1d0ff1"></script>26<script src="/static/copy.js?v=4efc1d0ff1" defer></script>2727</head>2828<body>2929<a class="skip-link" href="#site-main">skip to content</a>
testdata/golden/repo-a/blob/README.md.html
+3 −3
@@ -10,9 +10,9 @@1010<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">1111<link rel="manifest" href="/static/favicon/site.webmanifest">1212<link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml">13<link rel="stylesheet" href="/static/style.css?v=4cca5f59d7">14<script src="/static/theme.js?v=4cca5f59d7"></script>15<script src="/static/copy.js?v=4cca5f59d7" defer></script>13<link rel="stylesheet" href="/static/style.css?v=4efc1d0ff1">14<script src="/static/theme.js?v=4efc1d0ff1"></script>15<script src="/static/copy.js?v=4efc1d0ff1" defer></script>1616</head>1717<body>1818<a class="skip-link" href="#site-main">skip to content</a>
testdata/golden/repo-a/blob/big.txt.html
+3 −3
@@ -10,9 +10,9 @@1010<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">1111<link rel="manifest" href="/static/favicon/site.webmanifest">1212<link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml">13<link rel="stylesheet" href="/static/style.css?v=4cca5f59d7">14<script src="/static/theme.js?v=4cca5f59d7"></script>15<script src="/static/copy.js?v=4cca5f59d7" defer></script>13<link rel="stylesheet" href="/static/style.css?v=4efc1d0ff1">14<script src="/static/theme.js?v=4efc1d0ff1"></script>15<script src="/static/copy.js?v=4efc1d0ff1" defer></script>1616</head>1717<body>1818<a class="skip-link" href="#site-main">skip to content</a>
testdata/golden/repo-a/blob/cmd/hello/main.go.html
+3 −3
@@ -10,9 +10,9 @@1010<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">1111<link rel="manifest" href="/static/favicon/site.webmanifest">1212<link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml">13<link rel="stylesheet" href="/static/style.css?v=4cca5f59d7">14<script src="/static/theme.js?v=4cca5f59d7"></script>15<script src="/static/copy.js?v=4cca5f59d7" defer></script>13<link rel="stylesheet" href="/static/style.css?v=4efc1d0ff1">14<script src="/static/theme.js?v=4efc1d0ff1"></script>15<script src="/static/copy.js?v=4efc1d0ff1" defer></script>1616</head>1717<body>1818<a class="skip-link" href="#site-main">skip to content</a>
testdata/golden/repo-a/blob/data.bin.html
+3 −3
@@ -10,9 +10,9 @@1010<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">1111<link rel="manifest" href="/static/favicon/site.webmanifest">1212<link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml">13<link rel="stylesheet" href="/static/style.css?v=4cca5f59d7">14<script src="/static/theme.js?v=4cca5f59d7"></script>15<script src="/static/copy.js?v=4cca5f59d7" defer></script>13<link rel="stylesheet" href="/static/style.css?v=4efc1d0ff1">14<script src="/static/theme.js?v=4efc1d0ff1"></script>15<script src="/static/copy.js?v=4efc1d0ff1" defer></script>1616</head>1717<body>1818<a class="skip-link" href="#site-main">skip to content</a>
testdata/golden/repo-a/blob/docs/logo.png.html
+3 −3
@@ -10,9 +10,9 @@1010<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">1111<link rel="manifest" href="/static/favicon/site.webmanifest">1212<link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml">13<link rel="stylesheet" href="/static/style.css?v=4cca5f59d7">14<script src="/static/theme.js?v=4cca5f59d7"></script>15<script src="/static/copy.js?v=4cca5f59d7" defer></script>13<link rel="stylesheet" href="/static/style.css?v=4efc1d0ff1">14<script src="/static/theme.js?v=4efc1d0ff1"></script>15<script src="/static/copy.js?v=4efc1d0ff1" defer></script>1616</head>1717<body>1818<a class="skip-link" href="#site-main">skip to content</a>
testdata/golden/repo-a/branches/index.html
+3 −3
@@ -10,9 +10,9 @@1010<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">1111<link rel="manifest" href="/static/favicon/site.webmanifest">1212<link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml">13<link rel="stylesheet" href="/static/style.css?v=4cca5f59d7">14<script src="/static/theme.js?v=4cca5f59d7"></script>15<script src="/static/copy.js?v=4cca5f59d7" defer></script>13<link rel="stylesheet" href="/static/style.css?v=4efc1d0ff1">14<script src="/static/theme.js?v=4efc1d0ff1"></script>15<script src="/static/copy.js?v=4efc1d0ff1" defer></script>1616</head>1717<body>1818<a class="skip-link" href="#site-main">skip to content</a>
testdata/golden/repo-a/commit-latest.html
+3 −3
@@ -10,9 +10,9 @@1010<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">1111<link rel="manifest" href="/static/favicon/site.webmanifest">1212<link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml">13<link rel="stylesheet" href="/static/style.css?v=4cca5f59d7">14<script src="/static/theme.js?v=4cca5f59d7"></script>15<script src="/static/copy.js?v=4cca5f59d7" defer></script>13<link rel="stylesheet" href="/static/style.css?v=4efc1d0ff1">14<script src="/static/theme.js?v=4efc1d0ff1"></script>15<script src="/static/copy.js?v=4efc1d0ff1" defer></script>1616</head>1717<body>1818<a class="skip-link" href="#site-main">skip to content</a>
testdata/golden/repo-a/index.html
+3 −3
@@ -11,9 +11,9 @@1111<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">1212<link rel="manifest" href="/static/favicon/site.webmanifest">1313<link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml">14<link rel="stylesheet" href="/static/style.css?v=4cca5f59d7">15<script src="/static/theme.js?v=4cca5f59d7"></script>16<script src="/static/copy.js?v=4cca5f59d7" defer></script>14<link rel="stylesheet" href="/static/style.css?v=4efc1d0ff1">15<script src="/static/theme.js?v=4efc1d0ff1"></script>16<script src="/static/copy.js?v=4efc1d0ff1" defer></script>1717</head>1818<body>1919<a class="skip-link" href="#site-main">skip to content</a>
testdata/golden/repo-a/issues/index.html
+5 −3
@@ -10,9 +10,9 @@1010<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">1111<link rel="manifest" href="/static/favicon/site.webmanifest">1212<link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml">13<link rel="stylesheet" href="/static/style.css?v=4cca5f59d7">14<script src="/static/theme.js?v=4cca5f59d7"></script>15<script src="/static/copy.js?v=4cca5f59d7" defer></script>13<link rel="stylesheet" href="/static/style.css?v=4efc1d0ff1">14<script src="/static/theme.js?v=4efc1d0ff1"></script>15<script src="/static/copy.js?v=4efc1d0ff1" defer></script>1616</head>1717<body>1818<a class="skip-link" href="#site-main">skip to content</a>@@ -70,6 +70,7 @@7070 </summary>7171 <div class="pull-body markdown"><p>Could it say <strong>hello</strong> louder?</p>7272</div>737374<ol class="thread">7475 <li class="comment">7576 <p class="comment-head"><svg class="icon icon-comment" width="16" height="16" fill="currentColor" aria-hidden="true" focusable="false"><use href="#i-comment"></use></svg><b>Daniel</b> commented 20 Nov 26</p>@@ -97,6 +98,7 @@9798 <span class="badge badge--closed">closed</span>9899 </summary>99100 <div class="pull-body markdown"><p class="muted">No description.</p></div>101100102 </details>101103 </li>102104 </ol>
testdata/golden/repo-a/log/index.html
+3 −3
@@ -10,9 +10,9 @@1010<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">1111<link rel="manifest" href="/static/favicon/site.webmanifest">1212<link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml">13<link rel="stylesheet" href="/static/style.css?v=4cca5f59d7">14<script src="/static/theme.js?v=4cca5f59d7"></script>15<script src="/static/copy.js?v=4cca5f59d7" defer></script>13<link rel="stylesheet" href="/static/style.css?v=4efc1d0ff1">14<script src="/static/theme.js?v=4efc1d0ff1"></script>15<script src="/static/copy.js?v=4efc1d0ff1" defer></script>1616</head>1717<body>1818<a class="skip-link" href="#site-main">skip to content</a>
testdata/golden/repo-a/packages/index.html
+3 −3
@@ -10,9 +10,9 @@1010<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">1111<link rel="manifest" href="/static/favicon/site.webmanifest">1212<link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml">13<link rel="stylesheet" href="/static/style.css?v=4cca5f59d7">14<script src="/static/theme.js?v=4cca5f59d7"></script>15<script src="/static/copy.js?v=4cca5f59d7" defer></script>13<link rel="stylesheet" href="/static/style.css?v=4efc1d0ff1">14<script src="/static/theme.js?v=4efc1d0ff1"></script>15<script src="/static/copy.js?v=4efc1d0ff1" defer></script>1616</head>1717<body>1818<a class="skip-link" href="#site-main">skip to content</a>
testdata/golden/repo-a/pulls/index.html
+8 −3
@@ -10,9 +10,9 @@1010<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">1111<link rel="manifest" href="/static/favicon/site.webmanifest">1212<link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml">13<link rel="stylesheet" href="/static/style.css?v=4cca5f59d7">14<script src="/static/theme.js?v=4cca5f59d7"></script>15<script src="/static/copy.js?v=4cca5f59d7" defer></script>13<link rel="stylesheet" href="/static/style.css?v=4efc1d0ff1">14<script src="/static/theme.js?v=4efc1d0ff1"></script>15<script src="/static/copy.js?v=4efc1d0ff1" defer></script>1616</head>1717<body>1818<a class="skip-link" href="#site-main">skip to content</a>@@ -74,6 +74,7 @@7474<li><input disabled="" type="checkbox"> docs</li>7575</ul>7676</div>777778<ol class="thread">7879 <li class="comment">7980 <p class="comment-head"><svg class="icon icon-comment" width="16" height="16" fill="currentColor" aria-hidden="true" focusable="false"><use href="#i-comment"></use></svg><b>Daniel</b> commented 21 Nov 26</p>@@ -95,6 +96,7 @@9596 </summary>9697 <div class="pull-body markdown"><p>Merged after review.</p>9798</div>9998100 </details>99101 </li>100102 <li class="pull" id="pr-2">@@ -110,6 +112,7 @@110112 <div class="pull-body markdown"><p>Adds <code>-v</code>.</p>111113<p>shot</p>112114</div>115113116 </details>114117 </li>115118 <li class="pull" id="pr-3">@@ -124,6 +127,7 @@124127 </summary>125128 <div class="pull-body markdown"><p>Didn't pan out.</p>126129</div>130127131 </details>128132 </li>129133 <li class="pull" id="pr-1">@@ -137,6 +141,7 @@137141 <span class="badge badge--merged">merged</span>138142 </summary>139143 <div class="pull-body markdown"><p class="muted">No description.</p></div>144140145 </details>141146 </li>142147 </ol>
testdata/golden/repo-a/releases/index.html
+3 −3
@@ -10,9 +10,9 @@1010<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">1111<link rel="manifest" href="/static/favicon/site.webmanifest">1212<link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml">13<link rel="stylesheet" href="/static/style.css?v=4cca5f59d7">14<script src="/static/theme.js?v=4cca5f59d7"></script>15<script src="/static/copy.js?v=4cca5f59d7" defer></script>13<link rel="stylesheet" href="/static/style.css?v=4efc1d0ff1">14<script src="/static/theme.js?v=4efc1d0ff1"></script>15<script src="/static/copy.js?v=4efc1d0ff1" defer></script>1616</head>1717<body>1818<a class="skip-link" href="#site-main">skip to content</a>
testdata/golden/repo-a/tags/index.html
+3 −3
@@ -10,9 +10,9 @@1010<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">1111<link rel="manifest" href="/static/favicon/site.webmanifest">1212<link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml">13<link rel="stylesheet" href="/static/style.css?v=4cca5f59d7">14<script src="/static/theme.js?v=4cca5f59d7"></script>15<script src="/static/copy.js?v=4cca5f59d7" defer></script>13<link rel="stylesheet" href="/static/style.css?v=4efc1d0ff1">14<script src="/static/theme.js?v=4efc1d0ff1"></script>15<script src="/static/copy.js?v=4efc1d0ff1" defer></script>1616</head>1717<body>1818<a class="skip-link" href="#site-main">skip to content</a>
testdata/golden/repo-a/tree/cmd/hello/index.html
+3 −3
@@ -10,9 +10,9 @@1010<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">1111<link rel="manifest" href="/static/favicon/site.webmanifest">1212<link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml">13<link rel="stylesheet" href="/static/style.css?v=4cca5f59d7">14<script src="/static/theme.js?v=4cca5f59d7"></script>15<script src="/static/copy.js?v=4cca5f59d7" defer></script>13<link rel="stylesheet" href="/static/style.css?v=4efc1d0ff1">14<script src="/static/theme.js?v=4efc1d0ff1"></script>15<script src="/static/copy.js?v=4efc1d0ff1" defer></script>1616</head>1717<body>1818<a class="skip-link" href="#site-main">skip to content</a>
testdata/golden/repo-a/tree/docs/index.html
+3 −3
@@ -10,9 +10,9 @@1010<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">1111<link rel="manifest" href="/static/favicon/site.webmanifest">1212<link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml">13<link rel="stylesheet" href="/static/style.css?v=4cca5f59d7">14<script src="/static/theme.js?v=4cca5f59d7"></script>15<script src="/static/copy.js?v=4cca5f59d7" defer></script>13<link rel="stylesheet" href="/static/style.css?v=4efc1d0ff1">14<script src="/static/theme.js?v=4efc1d0ff1"></script>15<script src="/static/copy.js?v=4efc1d0ff1" defer></script>1616</head>1717<body>1818<a class="skip-link" href="#site-main">skip to content</a>
testdata/golden/repo-b/index.html
+3 −3
@@ -10,9 +10,9 @@1010<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">1111<link rel="manifest" href="/static/favicon/site.webmanifest">1212<link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml">13<link rel="stylesheet" href="/static/style.css?v=4cca5f59d7">14<script src="/static/theme.js?v=4cca5f59d7"></script>15<script src="/static/copy.js?v=4cca5f59d7" defer></script>13<link rel="stylesheet" href="/static/style.css?v=4efc1d0ff1">14<script src="/static/theme.js?v=4efc1d0ff1"></script>15<script src="/static/copy.js?v=4efc1d0ff1" defer></script>1616</head>1717<body>1818<a class="skip-link" href="#site-main">skip to content</a>
testdata/golden/repo-b/issues/index.html
+3 −3
@@ -10,9 +10,9 @@1010<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">1111<link rel="manifest" href="/static/favicon/site.webmanifest">1212<link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml">13<link rel="stylesheet" href="/static/style.css?v=4cca5f59d7">14<script src="/static/theme.js?v=4cca5f59d7"></script>15<script src="/static/copy.js?v=4cca5f59d7" defer></script>13<link rel="stylesheet" href="/static/style.css?v=4efc1d0ff1">14<script src="/static/theme.js?v=4efc1d0ff1"></script>15<script src="/static/copy.js?v=4efc1d0ff1" defer></script>1616</head>1717<body>1818<a class="skip-link" href="#site-main">skip to content</a>
testdata/golden/repo-b/log/index.html
+3 −3
@@ -10,9 +10,9 @@1010<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">1111<link rel="manifest" href="/static/favicon/site.webmanifest">1212<link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml">13<link rel="stylesheet" href="/static/style.css?v=4cca5f59d7">14<script src="/static/theme.js?v=4cca5f59d7"></script>15<script src="/static/copy.js?v=4cca5f59d7" defer></script>13<link rel="stylesheet" href="/static/style.css?v=4efc1d0ff1">14<script src="/static/theme.js?v=4efc1d0ff1"></script>15<script src="/static/copy.js?v=4efc1d0ff1" defer></script>1616</head>1717<body>1818<a class="skip-link" href="#site-main">skip to content</a>
testdata/golden/repo-b/releases/index.html
+3 −3
@@ -10,9 +10,9 @@1010<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">1111<link rel="manifest" href="/static/favicon/site.webmanifest">1212<link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml">13<link rel="stylesheet" href="/static/style.css?v=4cca5f59d7">14<script src="/static/theme.js?v=4cca5f59d7"></script>15<script src="/static/copy.js?v=4cca5f59d7" defer></script>13<link rel="stylesheet" href="/static/style.css?v=4efc1d0ff1">14<script src="/static/theme.js?v=4efc1d0ff1"></script>15<script src="/static/copy.js?v=4efc1d0ff1" defer></script>1616</head>1717<body>1818<a class="skip-link" href="#site-main">skip to content</a>
testdata/golden/repos/index.html
+3 −3
@@ -10,9 +10,9 @@1010<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon.png">1111<link rel="manifest" href="/static/favicon/site.webmanifest">1212<link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml">13<link rel="stylesheet" href="/static/style.css?v=4cca5f59d7">14<script src="/static/theme.js?v=4cca5f59d7"></script>15<script src="/static/copy.js?v=4cca5f59d7" defer></script>13<link rel="stylesheet" href="/static/style.css?v=4efc1d0ff1">14<script src="/static/theme.js?v=4efc1d0ff1"></script>15<script src="/static/copy.js?v=4efc1d0ff1" defer></script>1616</head>1717<body>1818<a class="skip-link" href="#site-main">skip to content</a>
web/static/style.css
+5 −0
@@ -3372,6 +3372,11 @@ a.ln:hover {33723372 list-style: none;33733373}337433743375.thread-more {3376 margin: 0 1rem 0.5rem 3.1rem;3377 font-size: 0.8rem;3378}337933753380.comment {33763381 padding: 0.5rem 0 0.5rem 1rem;33773382 border-left: 2px solid var(--rule);
web/templates/_repo.html
+6 −2
@@ -115,9 +115,13 @@115115</div>116116{{- end}}117117118{{/* thread: the comments under an issue or pull, oldest first */}}118{{/* thread: the comments under an issue or pull, oldest first. Takes an119 IssueView or PullView. */}}119120{{define "thread" -}}120{{with .}}121{{- if .Hidden}}122<p class="thread-more muted">{{.Hidden}} older comment{{if ne .Hidden 1}}s{{end}} not shown.</p>123{{- end}}124{{with .Thread}}121125<ol class="thread">122126 {{- range .}}123127 <li class="comment">
web/templates/issues.html
+2 −2
@@ -11,12 +11,12 @@1111 <span class="pr-icon pr--{{.State}}">{{if eq .State "open"}}{{template "icon" "issue"}}{{else}}{{template "icon" "issue-closed"}}{{end}}</span>1212 <div class="row-main">1313 <span class="row-title">{{.Title}}{{range .Labels}} <span class="pill">{{.Name}}</span>{{end}}</span>14 <span class="row-sub">#{{.Number}} opened {{day .CreatedAt}} by {{.User.Login}}{{with .Thread}} · {{len .}} comment{{if ne (len .) 1}}s{{end}}{{end}}</span>14 <span class="row-sub">#{{.Number}} opened {{day .CreatedAt}} by {{.User.Login}}{{with .Comments}} · {{.}} comment{{if ne . 1}}s{{end}}{{end}}</span>1515 </div>1616 <span class="badge badge--{{.State}}">{{.State}}</span>1717 </summary>1818 <div class="pull-body markdown">{{if .Body}}{{.Body}}{{else}}<p class="muted">No description.</p>{{end}}</div>19 {{- template "thread" .Thread}}19 {{- template "thread" .}}2020 </details>2121 </li>2222 {{- end}}
web/templates/pulls.html
+2 −2
@@ -11,12 +11,12 @@1111 <span class="pr-icon pr--{{$state}}">{{template "icon" "pull"}}</span>1212 <div class="row-main">1313 <span class="row-title">{{.Title}}</span>14 <span class="row-sub">#{{.Number}} opened {{day .CreatedAt}} by {{.User.Login}}{{with .Thread}} · {{len .}} comment{{if ne (len .) 1}}s{{end}}{{end}}</span>14 <span class="row-sub">#{{.Number}} opened {{day .CreatedAt}} by {{.User.Login}}{{with .Comments}} · {{.}} comment{{if ne . 1}}s{{end}}{{end}}</span>1515 </div>1616 <span class="badge badge--{{$state}}">{{$state}}</span>1717 </summary>1818 <div class="pull-body markdown">{{if .Body}}{{.Body}}{{else}}<p class="muted">No description.</p>{{end}}</div>19 {{- template "thread" .Thread}}19 {{- template "thread" .}}2020 </details>2121 </li>2222 {{- end}}