- vangen
go install 4d63.com/vangen@latest
- Update
vangen.json
with the vanity import path and the repository URL.
Example:
{
"prefix": "flipt",
"url": "https://github.com/flipt-io/flipt",
"source": {
"home": "https://github.com/flipt-io/flipt",
"dir": "https://github.com/flipt-io/flipt/tree/main{/dir}",
"file": "https://github.com/flipt-io/flipt/blob/main{/dir}/{file}#L{line}"
}
},
- Commit the change to the
main
branch.
git add vangen.json
git commit -m "Add vanity import path"
git push origin main
Automation should take over from here and push up to our GitHub Pages branch public
.
You can also manually build and deploy if necessary, following the steps below.
Build, commit and push to the public
branch.
git checkout public
git restore --source main vangen.json
vangen -out .
git add .
git commit -am "Update vanity go imports"
git push