command module
Version: v0.0.8 Latest Latest

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

Go to latest
Published: May 10, 2021 License: MIT Imports: 10 Imported by: 0




Generate HTML pages that allows you to set "custom" or "vanity" import paths for your Go packages using the go-import meta tag (read the specs).

For example, this package import path is (instead of


  • Painless to host: it's only static files
  • Designed to be used in a CI environment: ship as single binary with no OS dependencies
  • Easy to configure and extend via a single TOML configuration file


  • From GitHub releases: download the binary corresponding to your OS and architecture.
  • From source (make sure $GOPATH/bin is in your $PATH):
go get


    vanity-imports [option]

    --init                  creates a sample .vanity-imports.toml config file
    -c, --config CONFIG     path to the config. Defaults to .vanity-imports.toml
    -V, --version           print version

First, create a config file.

vanity-imports --init

Generate the HTML pages


Upload the content of the dist directory to your web server or your favorite static hosting service such as GitHub Pages, Netlify or Vercel.

Configuration format

Format for the .vanity-imports.toml file.

domain = "" # required
output = "output" # default to dist
repo_template = """<golang template>""" # override the default template for the repo page
index_template = """<golang template>""" # override the default template for the index page

description = ""
extra_head = "" # extra html tags appended to the head
title = "" # required


[repos."/dyndns"] # domain + "/dyndns will be your package import path
repo = "" # required. Url to the source repository


Checkout the netlify branch to find the code behind

Run Locally

Clone the project

git clone

Go to the project directory

cd vanity-imports

Generate the pages

go run .

View the output on your browser

cd dist
python3 -m http.server 8000
# open your browser to localhost:8000




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