vanity-builder

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 8 Imported by: 0

README

GitHub go.mod Go version Codacy grade Go Report Card Liberapay patrons ko-fi

vanity-builder

Simple tool that takes a YAML based config and generates a set of static HTML files based on Go templates that can be used for vanity URL self-hosting.

Example

Use code.vanderkleijn.net instead of github.com for your modules.

Why?

  • No renaming issues when (for whatever reason) you're moving away from Github to somewhere else;
  • Code can still be hosted on Github (or other places);

In other words: similar to gopkg.in but easily self-hostable.

Development notes

go-import: <vanityDomain>/<moduleName> git https://github.com/<user or org>/<repo>.git

go-source: content="<prefix> <homepage> <directory template> <file template>" Where:

  • prefix: <vanityDomain>/<moduleName>
    • The import path corresponding to the repo root
    • <moduleName> can include major version, e.g. moduleName or moduleName/v2
  • homepage: <homepageURL>
    • The url of the repo's homepage
    • The '_' character can be used to signify the absence of a homepage
  • directory template: https://github.com/<user or org>/<repo>/tree/<branch>{/dir}
    • An template used to create the URL for listing the files in the module
  • file template: https://github.com/<user or org>/<repo>/blob/<branch>{/dir}/{file}#L{line}
    • An template used to create the url that points to a line in a file

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL