vole
Clone
Read only, no credentials:
https://rodent.software/git/vole.git
Write over SSH with a registered key:
git clone ssh://git@0.0.0.0:2222/vole.git
A free and open-source forge that lives in your Git repo.
Serve repositories from the root of the URL space
ed03b3d1fa16ef6b55e2773aaf10e3be13282c3a · Keenan Nemetz · 5h ago · parent d37d301f
Serve repositories from the root of the URL space A repository is now /<name> and its Git transport /<name>.git, so the URL a person opens, the URL a clone uses, and the Go module path are the same name. The forge's own pages moved under /-/ (admin, accounts, the directory, the feed, sign-in, assets), a prefix no repository name can start with: names are [a-z0-9...] and cannot begin with "-". That leaves the router with two disjoint spaces and removes the /r/ and /git/ prefixes, which existed only to keep repositories away from the forge's own paths. Routes: repoRoutes lose /r/; global, auth and admin routes gain /-/; assets move to /-/static/ because a subtree pattern like /static/ cannot coexist with one-segment-wildcard repo routes — Go's mux reports them as conflicting neither-more-specific patterns. The catch-all still renders the styled 404. Transport: githttp.Route parses /<name>.git/<rest> instead of a /git/ prefix, and forgepaths.go hands such requests to the proxy before the mux, because a wildcard fills a whole segment and cannot match "<name>.git". LFS stays on the mux (<name>.git/info/lfs/...), and the Go module discovery probe moves to the same pre-router so a package path under a public repository is answered even when its first segments name a page tab. Names: repo.ValidateName now refuses the four root paths the forge must keep — static, robots.txt, sitemap.xml, sitemap-pages.xml. Everything else is an ordinary repository name, including admin, u, and activity. Docs and the packaged URLs follow the new layout; robots.txt, the sitemaps and the instance activity feed point at the new paths. No aliases: the old /r/ and /git/ URLs are gone. Verified with ./vole workflow check and ./vole workflow run verify.
server/web/templates/overview.html +11−11
| @@ -8,7 +8,7 @@ | |||
| 8 | 8 | <p class="page-sub">README, recent work, releases, and contributors · default branch <code>{{.Ref}}</code></p> | |
| 9 | 9 | </div> | |
| 10 | 10 | <div class="page-head-actions"> | |
| 11 | <a class="button" href="/r/{{.Name}}/code">{{icon "code"}}Browse code</a> | ||
| 11 | <a class="button" href="/{{.Name}}/code">{{icon "code"}}Browse code</a> | ||
| 12 | 12 | </div> | |
| 13 | 13 | </div> | |
| 14 | 14 | ||
| @@ -17,7 +17,7 @@ | |||
| 17 | 17 | {{if .Readme}} | |
| 18 | 18 | <div class="filehead"> | |
| 19 | 19 | <span>{{.ReadmeName}}</span> | |
| 20 | <a href="/r/{{.Name}}/blob/{{esc .Ref}}/{{.ReadmeName}}">view source</a> | ||
| 20 | <a href="/{{.Name}}/blob/{{esc .Ref}}/{{.ReadmeName}}">view source</a> | ||
| 21 | 21 | </div> | |
| 22 | 22 | <article class="md readme">{{.Readme}}</article> | |
| 23 | 23 | {{else if not .Commit}} | |
| @@ -32,11 +32,11 @@ git push -u origin {{.Ref}}</pre> | |||
| 32 | 32 | ||
| 33 | 33 | <aside class="overview-side"> | |
| 34 | 34 | <section> | |
| 35 | <h2 class="with-more"><span>{{icon "git-commit-horizontal"}}Recent commits</span> <a class="more" href="/r/{{.Name}}/commits/{{esc .Ref}}">all</a></h2> | ||
| 35 | <h2 class="with-more"><span>{{icon "git-commit-horizontal"}}Recent commits</span> <a class="more" href="/{{.Name}}/commits/{{esc .Ref}}">all</a></h2> | ||
| 36 | 36 | {{if .Commits}} | |
| 37 | 37 | <div class="side-list"> | |
| 38 | 38 | {{range .Commits}} | |
| 39 | <a class="side-commit" href="/r/{{$.Name}}/commit/{{.SHA}}"> | ||
| 39 | <a class="side-commit" href="/{{$.Name}}/commit/{{.SHA}}"> | ||
| 40 | 40 | <span class="side-subject">{{.Subject}}</span> | |
| 41 | 41 | <span class="side-meta"><span class="sha">{{short .SHA}}</span><span>{{since .When}}</span></span> | |
| 42 | 42 | </a> | |
| @@ -48,11 +48,11 @@ git push -u origin {{.Ref}}</pre> | |||
| 48 | 48 | </section> | |
| 49 | 49 | ||
| 50 | 50 | <section> | |
| 51 | <h2 class="with-more"><span>{{icon "circle-dot"}}Recent issues</span> <a class="more" href="/r/{{.Name}}/issues">all</a></h2> | ||
| 51 | <h2 class="with-more"><span>{{icon "circle-dot"}}Recent issues</span> <a class="more" href="/{{.Name}}/issues">all</a></h2> | ||
| 52 | 52 | {{if .RecentIssues}} | |
| 53 | 53 | <div class="side-list"> | |
| 54 | 54 | {{range .RecentIssues}} | |
| 55 | <a class="side-issue" href="/r/{{$.Name}}/issues/{{.ID}}"> | ||
| 55 | <a class="side-issue" href="/{{$.Name}}/issues/{{.ID}}"> | ||
| 56 | 56 | <span class="side-subject"><span class="side-num">{{num .Number}}</span>{{.Title}}</span> | |
| 57 | 57 | <span class="side-meta">{{who .Author}}<span>{{since .Created.Unix}}</span></span> | |
| 58 | 58 | </a> | |
| @@ -64,11 +64,11 @@ git push -u origin {{.Ref}}</pre> | |||
| 64 | 64 | </section> | |
| 65 | 65 | ||
| 66 | 66 | <section> | |
| 67 | <h2 class="with-more"><span>{{icon "git-pull-request"}}Recent changes</span> <a class="more" href="/r/{{.Name}}/changes">all</a></h2> | ||
| 67 | <h2 class="with-more"><span>{{icon "git-pull-request"}}Recent changes</span> <a class="more" href="/{{.Name}}/changes">all</a></h2> | ||
| 68 | 68 | {{if .RecentRequests}} | |
| 69 | 69 | <div class="side-list"> | |
| 70 | 70 | {{range .RecentRequests}} | |
| 71 | <a class="side-change" href="/r/{{$.Name}}/changes/{{.ID}}"> | ||
| 71 | <a class="side-change" href="/{{$.Name}}/changes/{{.ID}}"> | ||
| 72 | 72 | <span class="side-subject"><span class="side-num">{{num .Number}}</span>{{.Title}}</span> | |
| 73 | 73 | <span class="side-meta">{{who .Author}}<span>{{since .Created.Unix}}</span></span> | |
| 74 | 74 | </a> | |
| @@ -80,11 +80,11 @@ git push -u origin {{.Ref}}</pre> | |||
| 80 | 80 | </section> | |
| 81 | 81 | ||
| 82 | 82 | <section> | |
| 83 | <h2 class="with-more"><span>{{icon "play"}}Recent runs</span> <a class="more" href="/r/{{.Name}}/runs">all</a></h2> | ||
| 83 | <h2 class="with-more"><span>{{icon "play"}}Recent runs</span> <a class="more" href="/{{.Name}}/runs">all</a></h2> | ||
| 84 | 84 | {{if .Runs}} | |
| 85 | 85 | <div class="side-list"> | |
| 86 | 86 | {{range .Runs}} | |
| 87 | <a class="side-run" href="/r/{{$.Name}}/runs/{{.ID}}"> | ||
| 87 | <a class="side-run" href="/{{$.Name}}/runs/{{.ID}}"> | ||
| 88 | 88 | <span class="side-run-top"> | |
| 89 | 89 | <span class="status {{.Status}}">{{.Status}}</span> | |
| 90 | 90 | <span class="side-subject">{{.JobTitle}}</span> | |
| @@ -104,7 +104,7 @@ git push -u origin {{.Ref}}</pre> | |||
| 104 | 104 | <div class="side-list"> | |
| 105 | 105 | {{range .Tags}} | |
| 106 | 106 | <div class="side-row"> | |
| 107 | <a href="/r/{{$.Name}}/releases/{{.Name}}">{{.Name}}</a> | ||
| 107 | <a href="/{{$.Name}}/releases/{{.Name}}">{{.Name}}</a> | ||
| 108 | 108 | <span class="muted">{{since .When}}{{if not .Annotated}} · lightweight{{end}}</span> | |
| 109 | 109 | </div> | |
| 110 | 110 | {{end}} | |