A CLI-first git forge.

cli forge git self-hosted

https://gitbay.org

Commit 027a72496b

027a72496beee4257ee50fd36d104e0959193691

parent: 4df013a904

Verified · cmc

cmc <hello@cleberg.net> · 2026-08-24T17:20:03Z

web: surface archived state and topics

Repo header shows an amber archived chip and topic chips under the
description (repoPage gains Topics via ListTopics); index and owner
listings mark archived repos. Follows up the archived/topics backend
(d298215).
internal/httpd/web.go +3
@@ -120,6 +120,7 @@ type repoPage struct {
120120 CloneURL string
121121 Dir string
122122 Tab string // active tab in the repo header
123 Topics []string
123124 }
124125
125126 // repoFor resolves the repo for a web request; false means 404 was sent.
@@ -148,6 +149,7 @@ func (s *Server) repoFor(w http.ResponseWriter, r *http.Request, ref string) (re
148149 if ref == "" {
149150 ref = repo.DefaultBranch
150151 }
152 topics, _ := s.st.ListTopics(repo.ID)
151153 return repoPage{
152154 Site: s.siteName(),
153155 Viewer: viewer.Username,
@@ -156,6 +158,7 @@ func (s *Server) repoFor(w http.ResponseWriter, r *http.Request, ref string) (re
156158 Ref: ref,
157159 CloneURL: s.cfg.Server.SiteURL + "/" + repo.Path() + ".git",
158160 Dir: control.RepoDir(s.cfg.Server.Root, repo.OwnerName, repo.Name),
161 Topics: topics,
159162 }, true
160163 }
161164
internal/web/static/style.css +2
@@ -360,6 +360,8 @@ pre.diff .meta { color: var(--muted); }
360360 .chip-neutral, .chip-source_gone { --chip: var(--neutral); }
361361 .chip-stale { --chip: var(--warn); }
362362 .chip.label { font-weight: 500; }
363.chip.topic { --chip: var(--accent); }
364.repohead .topics { margin: 0 0 var(--sp-2); }
363365 .badge-verified { --chip: var(--ok); }
364366 .badge-unsigned { --chip: var(--neutral); }
365367 .badge-signed_unknown_key { --chip: var(--warn); }
internal/web/templates/index.html +1 −1
@@ -5,7 +5,7 @@
55 <h1>repositories</h1>
66 <ul class="repolist">
77 {{range .Repos}}<li>
8 <p class="reponame"><a href="/{{.OwnerName}}">{{.OwnerName}}</a>/<a href="/{{.OwnerName}}/{{.Name}}">{{.Name}}</a></p>
8 <p class="reponame"><a href="/{{.OwnerName}}">{{.OwnerName}}</a>/<a href="/{{.OwnerName}}/{{.Name}}">{{.Name}}</a>{{if .Settings.Archived}} <span class="chip chip-stale">archived</span>{{end}}</p>
99 {{if .Desc}}<p class="desc">{{.Desc}}</p>{{end}}
1010 <p class="meta">{{template "branchicon"}} {{.DefaultBranch}}</p>
1111 </li>
internal/web/templates/layout.html +2 −1
@@ -22,8 +22,9 @@
2222
2323 {{define "repoheader"}}
2424 <div class="repohead">
25<h1 class="repotitle"><a class="owner" href="/{{.Repo.OwnerName}}">{{.Repo.OwnerName}}</a><span class="sep">/</span><a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}">{{.Repo.Name}}</a>{{if eq .Repo.Visibility "private"}} <span class="chip chip-neutral">private</span>{{end}}</h1>
25<h1 class="repotitle"><a class="owner" href="/{{.Repo.OwnerName}}">{{.Repo.OwnerName}}</a><span class="sep">/</span><a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}">{{.Repo.Name}}</a>{{if eq .Repo.Visibility "private"}} <span class="chip chip-neutral">private</span>{{end}}{{if .Repo.Settings.Archived}} <span class="chip chip-stale">archived</span>{{end}}</h1>
2626 {{if .Desc}}<p class="desc">{{.Desc}}</p>{{end}}
27{{if .Topics}}<p class="topics">{{range .Topics}}<span class="chip topic">{{.}}</span> {{end}}</p>{{end}}
2728 <nav class="tabs">
2829 <a {{if eq .Tab "files"}}class="active" {{end}}href="/{{.Repo.OwnerName}}/{{.Repo.Name}}">files</a>
2930 <a {{if eq .Tab "log"}}class="active" {{end}}href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/log">log</a>
internal/web/templates/owner.html +1 −1
@@ -7,7 +7,7 @@
77 {{if .Members}}<p class="meta">members {{range .Members}}<a class="memberchip" href="/{{.Username}}">{{.Username}} <span class="role">{{.Role}}</span></a> {{end}}</p>{{end}}
88 <ul class="repolist">
99 {{range .Repos}}<li>
10 <p class="reponame"><a href="/{{.OwnerName}}/{{.Name}}">{{.Name}}</a>{{if eq .Visibility "private"}} <span class="chip chip-neutral">private</span>{{end}}</p>
10 <p class="reponame"><a href="/{{.OwnerName}}/{{.Name}}">{{.Name}}</a>{{if eq .Visibility "private"}} <span class="chip chip-neutral">private</span>{{end}}{{if .Settings.Archived}} <span class="chip chip-stale">archived</span>{{end}}</p>
1111 {{if .Desc}}<p class="desc">{{.Desc}}</p>{{end}}
1212 <p class="meta">{{template "branchicon"}} {{.DefaultBranch}}</p>
1313 </li>