{"id":15640540,"url":"https://github.com/leighmcculloch/vangen","last_synced_at":"2025-04-14T16:12:21.984Z","repository":{"id":37493403,"uuid":"99539770","full_name":"leighmcculloch/vangen","owner":"leighmcculloch","description":"Tool for generating static HTML for Go vanity import paths.","archived":false,"fork":false,"pushed_at":"2024-08-08T13:28:33.000Z","size":62,"stargazers_count":82,"open_issues_count":1,"forks_count":17,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-14T16:12:11.598Z","etag":null,"topics":["go","golang"],"latest_commit_sha":null,"homepage":"https://4d63.com/vangen","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/leighmcculloch.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":"2017-08-07T05:27:47.000Z","updated_at":"2025-04-08T21:38:30.000Z","dependencies_parsed_at":"2024-10-23T05:25:29.972Z","dependency_job_id":null,"html_url":"https://github.com/leighmcculloch/vangen","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leighmcculloch%2Fvangen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leighmcculloch%2Fvangen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leighmcculloch%2Fvangen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leighmcculloch%2Fvangen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leighmcculloch","download_url":"https://codeload.github.com/leighmcculloch/vangen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248914116,"owners_count":21182359,"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"],"created_at":"2024-10-03T11:37:11.082Z","updated_at":"2025-04-14T16:12:21.938Z","avatar_url":"https://github.com/leighmcculloch.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vangen\n![.github/workflows/test.yml](https://github.com/leighmcculloch/vangen/workflows/.github/workflows/test.yml/badge.svg)\n![.github/workflows/release.yml](https://github.com/leighmcculloch/vangen/workflows/.github/workflows/release.yml/badge.svg)\n[![Go Report Card](https://goreportcard.com/badge/github.com/leighmcculloch/vangen)](https://goreportcard.com/report/github.com/leighmcculloch/vangen)\n[![Go docs](https://img.shields.io/badge/godoc-reference-blue.svg)](https://pkg.go.dev/github.com/leighmcculloch/vangen)\n\nVangen is a tool for generating static HTML for Go vanity import paths.\n\nGo vanity import paths work by serving a HTML file that tells the `go get` tool where to download the source from. You can still host the source code at Github, BitBucket, but the vanity URL gives you portability and other benefits.\n\n## Why\n* Maintain Go vanity import paths with a simple definition file `vangen.json`.\n* Host Go vanity import paths using static hosting. No need for Google AppEngine, Heroku, etc. Host the files on Github Pages, AWS S3, Google Cloud Storage, etc.\n\n## Install\n\n### Source\n\n```\ngo get 4d63.com/vangen\n```\n\n### Linux\n\n```\ncurl -sSL https://github.com/leighmcculloch/vangen/releases/download/v1.1.3/vangen_1.1.3_linux_amd64.tar.gz | tar xz -C /usr/local/bin vangen\n```\n\n### Mac\n\n```\ncurl -sSL https://github.com/leighmcculloch/vangen/releases/download/v1.1.3/vangen_1.1.3_darwin_amd64.tar.gz | tar xz -C /usr/local/bin vangen\n```\n\n### Windows\n\n[Download the executable](https://github.com/leighmcculloch/vangen/releases/download/v1.1.3/vangen_1.1.3_windows_amd64.zip), and save it to your path.\n\n## Usage\n\n1. Create a `vangen.json` (see examples below)\n2. Run `vangen`\n3. Host the files outputted in `vangen/` at your domain\n4. Try it out with `go get [domain]/[package]`\n\n```\n$ vangen -help\nVangen is a tool for generating static HTML for hosting Go repositories at a vanity import path.\n\nUsage:\n\n  vangen [-config=vangen.json] [-out=vangen/]\n\nFlags:\n\n  -config filename\n        vangen json configuration filename (default \"vangen.json\")\n  -help\n        print this help list\n  -out directory\n        output directory that static files will be written to (default \"vangen/\")\n  -verbose\n        print verbose output when run\n  -version\n        print program version\n```\n\n## Examples\n\n### Minimal\n\nThe repository `type` and `source` properties will be set automatically when `url` begins with `https://github.com` or `https://gitlab.com`. Below is a minimal config for a project hosted on GitHub.\n\n```json\n{\n  \"domain\": \"4d63.com\",\n  \"repositories\": [\n    {\n      \"prefix\": \"optional\",\n      \"subs\": [\n        \"template\"\n      ],\n      \"url\": \"https://github.com/leighmcculloch/go-optional\"\n    }\n  ]\n}\n```\n\n### All fields\n\n```json\n{\n  \"domain\": \"4d63.com\",\n  \"docsDomain\": \"pkg.go.dev\",\n  \"repositories\": [\n    {\n      \"prefix\": \"optional\",\n      \"subs\": [\n        \"template\"\n      ],\n      \"type\": \"git\",\n      \"hidden\": false,\n      \"url\": \"https://github.com/leighmcculloch/go-optional\",\n      \"source\": {\n        \"home\": \"https://github.com/leighmcculloch/go-optional\",\n        \"dir\": \"https://github.com/leighmcculloch/go-optional/tree/master{/dir}\",\n        \"file\": \"https://github.com/leighmcculloch/go-optional/blob/master{/dir}/{file}#L{line}\"\n      },\n      \"website\": {\n        \"url\": \"https://github.com/leighmcculoch/go-optional\"\n      }\n    }\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleighmcculloch%2Fvangen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleighmcculloch%2Fvangen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleighmcculloch%2Fvangen/lists"}