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 · 3h 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/static/vole.css +11−11
| @@ -37,7 +37,7 @@ | |||
| 37 | 37 | language colours file-icon and language-dot palette | |
| 38 | 38 | ||
| 39 | 39 | Note the two pairs that are easy to confuse: "repository home" is the clone | |
| 40 | button and readme on /r/<name>, while "landing page" is the instance home at | ||
| 40 | button and readme on /<name>, while "landing page" is the instance home at | ||
| 41 | 41 | /; "repository overview" is the summary page, while "repository overview | |
| 42 | 42 | sidebar" is the small commit and run rows it uses. */ | |
| 43 | 43 | ||
| @@ -114,7 +114,7 @@ | |||
| 114 | 114 | font-style: normal; | |
| 115 | 115 | font-weight: 100 900; | |
| 116 | 116 | font-display: swap; | |
| 117 | src: url("/static/fonts/lexend-latin-ext.woff2") format("woff2"); | ||
| 117 | src: url("/-/static/fonts/lexend-latin-ext.woff2") format("woff2"); | ||
| 118 | 118 | unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; | |
| 119 | 119 | } | |
| 120 | 120 | @font-face { | |
| @@ -122,7 +122,7 @@ | |||
| 122 | 122 | font-style: normal; | |
| 123 | 123 | font-weight: 100 900; | |
| 124 | 124 | font-display: swap; | |
| 125 | src: url("/static/fonts/lexend-latin.woff2") format("woff2"); | ||
| 125 | src: url("/-/static/fonts/lexend-latin.woff2") format("woff2"); | ||
| 126 | 126 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; | |
| 127 | 127 | } | |
| 128 | 128 | @font-face { | |
| @@ -130,7 +130,7 @@ | |||
| 130 | 130 | font-style: normal; | |
| 131 | 131 | font-weight: 100 800; | |
| 132 | 132 | font-display: swap; | |
| 133 | src: url("/static/fonts/jetbrains-mono-latin-ext.woff2") format("woff2"); | ||
| 133 | src: url("/-/static/fonts/jetbrains-mono-latin-ext.woff2") format("woff2"); | ||
| 134 | 134 | unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; | |
| 135 | 135 | } | |
| 136 | 136 | @font-face { | |
| @@ -138,7 +138,7 @@ | |||
| 138 | 138 | font-style: normal; | |
| 139 | 139 | font-weight: 100 800; | |
| 140 | 140 | font-display: swap; | |
| 141 | src: url("/static/fonts/jetbrains-mono-latin.woff2") format("woff2"); | ||
| 141 | src: url("/-/static/fonts/jetbrains-mono-latin.woff2") format("woff2"); | ||
| 142 | 142 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; | |
| 143 | 143 | } | |
| 144 | 144 | @font-face { | |
| @@ -146,7 +146,7 @@ | |||
| 146 | 146 | font-style: italic; | |
| 147 | 147 | font-weight: 100 800; | |
| 148 | 148 | font-display: swap; | |
| 149 | src: url("/static/fonts/jetbrains-mono-italic-latin-ext.woff2") format("woff2"); | ||
| 149 | src: url("/-/static/fonts/jetbrains-mono-italic-latin-ext.woff2") format("woff2"); | ||
| 150 | 150 | unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; | |
| 151 | 151 | } | |
| 152 | 152 | @font-face { | |
| @@ -154,7 +154,7 @@ | |||
| 154 | 154 | font-style: italic; | |
| 155 | 155 | font-weight: 100 800; | |
| 156 | 156 | font-display: swap; | |
| 157 | src: url("/static/fonts/jetbrains-mono-italic-latin.woff2") format("woff2"); | ||
| 157 | src: url("/-/static/fonts/jetbrains-mono-italic-latin.woff2") format("woff2"); | ||
| 158 | 158 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; | |
| 159 | 159 | } | |
| 160 | 160 | ||
| @@ -262,13 +262,13 @@ img { max-width: 100%; } | |||
| 262 | 262 | inner-ear holes; the whisker gaps still show the bar. */ | |
| 263 | 263 | .brand .mark::before { | |
| 264 | 264 | background-color: var(--mark-outline); | |
| 265 | -webkit-mask-image: url("/static/vole-head-solid.png"); | ||
| 266 | mask-image: url("/static/vole-head-solid.png"); | ||
| 265 | -webkit-mask-image: url("/-/static/vole-head-solid.png"); | ||
| 266 | mask-image: url("/-/static/vole-head-solid.png"); | ||
| 267 | 267 | } | |
| 268 | 268 | .brand .mark::after { | |
| 269 | 269 | background-color: var(--mark-fill); | |
| 270 | -webkit-mask-image: url("/static/vole-head.png"); | ||
| 271 | mask-image: url("/static/vole-head.png"); | ||
| 270 | -webkit-mask-image: url("/-/static/vole-head.png"); | ||
| 271 | mask-image: url("/-/static/vole-head.png"); | ||
| 272 | 272 | } | |
| 273 | 273 | ||
| 274 | 274 | .topnav { display: flex; gap: 6px; } | |