{"id":16401207,"url":"https://github.com/mlcdf/vanity-imports","last_synced_at":"2025-10-15T14:17:30.583Z","repository":{"id":95358769,"uuid":"365632056","full_name":"mlcdf/vanity-imports","owner":"mlcdf","description":"Use a custom domain in your Go import path","archived":false,"fork":false,"pushed_at":"2023-09-17T08:59:31.000Z","size":44,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-13T10:35:46.591Z","etag":null,"topics":["go","golang","static-site-generator"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlcdf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-08T23:47:06.000Z","updated_at":"2024-11-14T14:49:54.000Z","dependencies_parsed_at":"2024-06-20T10:20:47.305Z","dependency_job_id":"c140bd42-a50a-4cb5-916a-88c76b737a49","html_url":"https://github.com/mlcdf/vanity-imports","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/mlcdf/vanity-imports","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlcdf%2Fvanity-imports","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlcdf%2Fvanity-imports/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlcdf%2Fvanity-imports/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlcdf%2Fvanity-imports/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlcdf","download_url":"https://codeload.github.com/mlcdf/vanity-imports/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlcdf%2Fvanity-imports/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265228987,"owners_count":23731092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","static-site-generator"],"created_at":"2024-10-11T05:29:44.130Z","updated_at":"2025-10-15T14:17:25.543Z","avatar_url":"https://github.com/mlcdf.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# vanity-imports\n\n[![test](https://github.com/mlcdf/vanity-imports/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/mlcdf/vanity-imports/actions/workflows/test.yml)\n\n\nGenerate HTML pages that allow you to set [\"custom\" or \"vanity\" import paths](https://golang.org/doc/go1.4#canonicalimports) for your Go packages using the `go-import` meta tag ([read the specs](https://golang.org/cmd/go/#hdr-Remote_import_paths)).\n\nFor example, this package import path is `go.mlcdf.fr/vanity-imports` (instead of `github.com/mlcdf/vanity-imports`).\n\n## Highlights\n\n- Painless to host: it's only static files\n- Designed to be used in a CI environment: ship as single binary with no OS dependencies\n- Easy to configure and extend via a single TOML configuration file\n- Use your own template for the index and the repo pages.\n\n## Install\n\n- From [GitHub releases](https://github.com/mlcdf/vanity-imports/releases): download the binary corresponding to your OS and architecture.\n- From source (make sure `$GOPATH/bin` is in your `$PATH`):\n\n```sh\ngo get go.mlcdf.fr/vanity-imports\n```\n\n## Usage\n\n```\nUsage:\n    vanity-imports [option]\n\nOptions:\n    --init                  creates a sample .vanity-imports.toml config file\n    -c, --config CONFIG     path to the config. Defaults to .vanity-imports.toml\n    -V, --version           print version\n```\n\nFirst, create a [config file](#configuration-format).\n```sh\nvanity-imports --init\n```\n\nGenerate the HTML pages\n```sh\nvanity-imports\n```\n\nUpload the content of the `dist` directory to your web server or your favorite static hosting service such as GitHub Pages, OVHcloud Web Hosting or Netlify.\n\n## Configuration format\n\nFormat for the `.vanity-imports.toml` file.\n\n```toml\ndomain = \"go.mlcdf.fr\" # required\noutput = \"output\" # default to dist\nrepo_template = \"\"\"\u003cgolang template\u003e\"\"\" # override the default template for the repo page\nindex_template = \"\"\"\u003cgolang template\u003e\"\"\" # override the default template for the index page\n\n[index]\ndescription = \"\"\nextra_head = \"\" # extra html tags appended to the head\ntitle = \"\" # required\n\n[repos]\n\n[repos.\"/dyndns\"] # domain + \"/dyndns will be your package import path\nrepo = \"https://github.com/mlcdf/dyndns/\" # required. Url to the source repository\nvcs = \"git\"\n```\n\n## Example usage\n\nCheck out the [netlify](https://github.com/mlcdf/vanity-imports/tree/netlify) branch to find the code behind https://go.mlcdf.fr/.\n\n## Development\n\nGenerate the pages\n```bash\ngo run .\n```\n\nRegenerate the pages on file changes and start a web server\non http://localhost:3000.\n\n```bash\n./scripts/dev.sh\n```\n\nRun the tests\n```sh\ngo test ./...\n```\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlcdf%2Fvanity-imports","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlcdf%2Fvanity-imports","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlcdf%2Fvanity-imports/lists"}