-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for VCS Autodiscovery #17
Comments
This looks very interesting. How would vangen change to use the autodiscovery? |
I think vangen just needs to generate those tags as well (and add the relevant configuration in the json). I can craft a PR in the next days if you want. |
I think given the small number of VCS services, it will probably keep the logic in vangen simpler to maintain if we just hardcode any that are missing. Is there a software VCS that you'd like to add support to? |
I think we should split at least the forge type and forge URL. Forge types:
Forge URLs:
|
How would that be used? |
Here is a config example, oriented towards supporting Full custom example (but you prefer not to offer such a solution I understand).{
"domain": "example.com",
"docsDomain": "pkg.go.dev",
"index": true,
"repositories": [
// full custom example
{
// unrelated changes, closer to the go vocabulary
"module": "pkg3",
"packages": ["subpkg1"],
// vcs tag
"vcs": {
"type": "git", // required
"defaultBranch": "main", // optional
"clone": [
"https://rfc.example.com/repositories/go-pkg3.git",
"ssh://[email protected]/repositories/go-pkg3"
]
},
"forge": {
// custom definition
"rawfile": "https://rfc.example/{path}?ref={ref}&raw=1",
"file": "https://rfc.example/{path}?ref={ref}",
"dir": "https://rfc.example/{ref}/{path}",
"summary": "https://rfc.example/my-cool-project",
"line": "https://rfc.example/tree/{ref}/item/{path}#L{line}"
}
}
]
} Minimal example, just adding a
|
I implemented my own package to generate the go documentation under the vanity URL: https://code.pfad.fr/vanitydoc, which implements the The package regarding autodiscovery is documented here: https://code.pfad.fr/vanitydoc/autodiscovery It only support generating the documentation of a given module (so the index has to be curated manually, opposite to vangen) |
I stumbled upon a RFC for generic VCS Autodiscovery: https://git.sr.ht/~ancarda/vcs-autodiscovery-rfc/tree/HEAD/RFC.md which add a couple of
meta
tags:I think it would be a nice addition to
vangen
.If you agree, I can try to craft a PR!
Support is not widespread yet, but https://godocs.io/ supports it.
cc @ancarda (author of the RFC)
The text was updated successfully, but these errors were encountered: