Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

Document the root-level URL layout

b7396a1155147a13c5595216f204a545e9f74202 · Keenan Nemetz · 9h ago · parent ed03b3d1

Document the root-level URL layout

The guides now say /<name> for a repository and /-/ for the forge's own pages,
including the clone examples, theme asset paths, profile and registration
URLs, robots.txt, and the deployment package URLs. docs/architecture.md gains
a short URL layout section: why the two spaces cannot collide, the four root
names the forge keeps, and why the transport carries .git.

docs/go-modules.md follows the layout: the module path is the repository page,
the clone URL is the same name with .git, discovery is answered before the
router, and a published module path is durable because renaming the repository
breaks it.

docs/go-modules.md +20−8

@@ -22,14 +22,20 @@ repository with that repository's Git transport:
22 22 $ curl -s 'https://rodent.software/vole?go-get=1'
23 23 <!doctype html>
24 24 ...
25 <meta name="go-import" content="rodent.software/vole git https://rodent.software/git/vole.git">
25 <meta name="go-import" content="rodent.software/vole git https://rodent.software/vole.git">
26 26 ```
27 27
28 28 Then `go` clones the repository over the smart-HTTP transport and resolves the
29 29 package from the tag it finds there, exactly as it would for a module on any
30 other forge. A package inside the module (`rodent.software/vole/server/web`)
31 resolves from the same tag: the go command asks the full path first, and the tag
32 it gets names the repository prefix.
30 other forge. The transport lives beside the pages: `/<repository>` is the
31 repository and `/<repository>.git` is its Git URL, so the tag's clone URL and the
32 page a person opens are the same name.
33
34 A package inside the module (`rodent.software/vole/server/web`) resolves from the
35 same tag: the go command asks the full path first, and the tag it gets names the
36 repository prefix. That path is not a page, and it does not need to be — the
37 probe is answered before the router, for any path whose first segment names a
38 public repository.
33 39
34 40 Add the repository to a project as usual:
35 41
@@ -64,10 +70,16 @@ a repository that is public.
64 70 ## Naming
65 71
66 72 The import path is `<host>/<repository>`, so the repository name is also the last
67 element of every import path inside the module. A repository named after a page
68 the forge already serves at the top level — `r`, `u`, `admin`, `activity`,
69 `login`, `static`, and so on — keeps its pages and its clone URL but cannot claim
70 that module path; pick another name if the code is meant to be imported.
73 element of every import path inside the module. Every name is available for this
74 except the four the forge keeps at the root for reasons a URL cannot avoid:
75 `static` (assets), and `robots.txt`, `sitemap.xml`, and `sitemap-pages.xml`
76 (crawlers only look for those at the root). The forge's own pages live under
77 `/-/`, a prefix no repository name can start with, so `admin`, `login`, `activity`
78 and the rest are ordinary repository names.
79
80 Because the name is the import path, renaming a repository that other modules
81 import breaks them: there is no forwarding layer in front of the forge. Rename
82 the pages, or keep the name a published module depends on.
71 83
72 84 ## Vole's own module
73 85