{"id":30708121,"url":"https://github.com/foundata/hugo-theme-govanity","last_synced_at":"2026-06-22T19:31:19.037Z","repository":{"id":312171183,"uuid":"1046412140","full_name":"foundata/hugo-theme-govanity","owner":"foundata","description":"Hugo theme to create vanity import paths / URLs for \"go get\" or \"import\".","archived":false,"fork":false,"pushed_at":"2025-09-01T21:58:16.000Z","size":150,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-29T21:28:14.530Z","etag":null,"topics":["go","golang","hugo","hugo-theme","vanity","vanity-import"],"latest_commit_sha":null,"homepage":"https://foundata.com/en/projects/hugo-theme-govanity/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foundata.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSES/GPL-3.0-or-later.txt","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,"zenodo":null}},"created_at":"2025-08-28T16:43:25.000Z","updated_at":"2025-10-04T21:02:04.000Z","dependencies_parsed_at":"2025-08-29T04:30:49.202Z","dependency_job_id":"7b8167b9-e45c-47de-9020-24631ff99275","html_url":"https://github.com/foundata/hugo-theme-govanity","commit_stats":null,"previous_names":["foundata/hugo-theme-govanity"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/foundata/hugo-theme-govanity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundata%2Fhugo-theme-govanity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundata%2Fhugo-theme-govanity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundata%2Fhugo-theme-govanity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundata%2Fhugo-theme-govanity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foundata","download_url":"https://codeload.github.com/foundata/hugo-theme-govanity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundata%2Fhugo-theme-govanity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34663522,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","hugo","hugo-theme","vanity","vanity-import"],"created_at":"2025-09-02T21:04:34.659Z","updated_at":"2026-06-22T19:31:19.029Z","avatar_url":"https://github.com/foundata.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hugo theme: govanity (vanity URLs for Go modules / packages with Hugo)\n\nThe **`govanity` Hugo theme** simplifies building and maintaining a vanity base domain such as `go.example.com` or `example.dev` and serving the required `\u003cmeta\u003e` tags for [vanity import paths](https://pkg.go.dev/cmd/go#hdr-Remote_import_paths).\n\nThe generated static site can be deployed on any static-capable host. The landing page lists all modules; each module is a content file with fitting front matter. See [`archetypes/default.md`](archetypes/default.md) for a ready-to-use template.\n\n\n## Table of contents\n\n- [Why vanity import paths?](#reasoning)\n- [Demo](#demo)\n- [Installation](#installation)\n  - [Using Hugo modules](#installation-hugo-modules)\n  - [Using Git submodules](#installation-git-submodules)\n- [Configuration](#configuration)\n  - [Settings](#settings)\n    - [`vanityPageTags`](#setting-vanityPageTags)\n    - [`header.logo`](#setting-header-logo)\n    - [`header.showTitle`](#setting-header-showTitle)\n    - [`header.title`](#setting-header-title)\n    - [`footer.additionalText`](#setting-footer-additionalText)\n    - [`footer.additionalTextTrailingBreak`](#setting-footer-additionalTextTrailingBreak)\n    - [`footer.showThemeInfo`](#setting-footer-showThemeInfo)\n    - [`footer.showTrademarksInfo`](#setting-footer-showTrademarksInfo)\n    - [`footer.showGoGopherInfo`](#setting-footer-showGoGopherInfo)\n- [Usage](#usage)\n  - [Creating new entries](#usage-add-entries)\n  - [Deployment](#deployment)\n- [Compatibility](#compatibility)\n- [Contributing](#contributing)\n- [Troubleshooting](#troubleshooting)\n- [Licensing, copyright](#licensing-copyright)\n- [Author information](#author-information)\n\n\n## Why vanity import paths?\u003ca id=\"reasoning\"\u003e\u003c/a\u003e\n\nBy default, Go imports point to repository hosts, e.g.:\n\n```go\nimport \"github.com/user-or-org/foo\"\n```\n\nVanity import paths decouple the import path from the code host. For example, the module **hugo-theme-dev** can be imported as:\n\n```go\nimport \"golang.foundata.com/hugo-theme-dev\"\n```\n\nUnder the hood, the site serves `\u003cmeta name=\"go-import\" ...\u003e` that redirect tooling to the real repository (e.g. GitHub).\n\n**Further reading, references:**\n\n* [Vanity import paths in Go](https://sagikazarmark.hu/blog/vanity-import-paths-in-go/) by Márk Sági-Kazár\n* [Using Go Vanity URLs with Hugo](https://blog.jbowen.dev/2020/07/using-go-vanity-urls-with-hugo/) by Jessica Bowen\n* [`go` docs: Remote import paths](https://pkg.go.dev/cmd/go#hdr-Remote_import_paths)\n\n\n## Demo\u003ca id=\"demo\"\u003e\u003c/a\u003e\n\nClone the repository and run the included [example content](./exampleSite/content/) (requires Hugo, Go, and Git):\n\n```bash\ngit clone https://github.com/foundata/hugo-theme-govanity.git\ncd ./hugo-theme-govanity/exampleSite\nHUGO_MODULE_WORKSPACE=hugo.work hugo server --ignoreVendorPaths \"**\"\n```\n\nOr look at the following pages using this theme:\n\n* https://golang.foundata.com/\n\n\n## Installation\u003ca id=\"installation\"\u003e\u003c/a\u003e\n\n### Using Hugo modules\u003ca id=\"installation-hugo-modules\"\u003e\u003c/a\u003e\n\nAdd the following module path(s) to your [`theme:` configuration](https://gohugo.io/hugo-modules/theme-components/):\n\n```yaml\ntheme:\n  - \"golang.foundata.com/hugo-theme-govanity\"\n```\n\nHugo automatically fetches and import theme module paths as Go/Hugo modules, so you do **not** need to list them under `module.imports` manually. Using modules requires [Hugo, Go, and Git](https://gohugo.io/hugo-modules/use-modules/#prerequisite) to be installed on your system.\n\n\n### Using Git submodules\u003ca id=\"installation-git-submodules\"\u003e\u003c/a\u003e\n\nFrom the root directory of your Hugo site, initialize a new Git repository (if you haven't already), then add the theme as a [Git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules):\n\n```bash\ngit submodule add https://github.com/foundata/hugo-theme-govanity.git themes/govanity\n```\n\nNow reference the theme directory name in your [`theme:` configuration](https://gohugo.io/hugo-modules/theme-components/):\n\n```yaml\ntheme:\n  - \"govanity\"\n```\n\n\n## Configuration\u003ca id=\"configuration\"\u003e\u003c/a\u003e\n\nSet your **vanity base URL** in the Hugo config (this must be the (sub)domain that serves your vanity paths) and disable unsupported page kinds:\n\n```yaml\nbaseURL: \"https://go.example.com/\"\n\n# Single-purpose theme; exact request URIs are critical.\n# Disable features that could alter URLs or produce needless pages:\n# - Unsupported page kinds\n# - Multilingual/i18n (interferes with Go vanity import path matching)\ndisableKinds:\n  - \"rss\"\n  - \"section\"\n  - \"taxonomy\"\n  - \"term\"\ndefaultContentLanguageInSubdir: false\n```\n\n\u003e ℹ️ **Heads-up:** Exact host + path matters to the Go toolchain. Use HTTPS and avoid extra path segments in `baseURL`. Do not forget the trailing slash.\n\n\n### Settings\u003ca id=\"settings\"\u003e\u003c/a\u003e\n\nThis section documents the theme options you can place under `params.theme` in your Hugo configuration. The example configurations and are safe to copy-paste. All keys are optional and the theme falls back to sensible behavior unless otherwise noted.\n\n\u003e ⚠ Easy adaption of colors is not implemented yet (see [Issue #6](https://github.com/foundata/hugo-theme-govanity/issues/6)). Coming releases will provide this, stay tuned.\n\n\n#### `vanityPageTags`\u003ca id=\"setting-vanityPageTags\"\u003e\u003c/a\u003e\n\n- Type: List of strings.\n- Default: `[\"go-module\"]`\n- Purpose:\n  - Only content pages that define **at least one of these tags** in their Front Matter **are treated as vanity module pages** (included in the overview and get the `go-import` / `go-source` meta tags emitted early).\n  - Put the tags in each module page's Front Matter under `tags:`.\n- **Example (config):**\n  ```yaml\n  params:\n    theme:\n      vanityPageTags:\n        - \"go-module\"\n        - \"hugo-module\"\n  ```\n- **Example (page Front Matter):**\n  ```yaml\n  ---\n  title: \"hugo-theme-dev\"\n  tags:\n    - \"go-module\"\n    - \"hugo-module\"\n  repo:\n    root: \"github.com/foundata/hugo-theme-dev\"\n  ---\n  ```\n\n\n#### `header.logo`\u003ca id=\"setting-header-logo\"\u003e\u003c/a\u003e\n\n- Type: Object with `src`, optional `width`, optional `height`.\n- Default: Not set.\n- Purpose:\n  -  Show a logo in the header.\n  - `src` is a **relative path under `/assets`** (e.g., `images/logo.svg`).\n  -  `width` and `height` become `\u003cimg\u003e` attributes (strings), letting you control layout.\n- **Example (config):**\n  ```yaml\n  params:\n    theme:\n      header:\n        logo:\n          # This image is shipped with the theme\n          src: \"images/logo-go-gopher-network.svg\"\n          width: \"40\"\n          height: \"35\"\n  ```\n\n\n#### `header.showTitle`\u003ca id=\"setting-header-showTitle\"\u003e\u003c/a\u003e\n\n- Type: Boolean.\n- Default: `true`\n- Purpose:\n  - Toggle a text title in the header (rendered next to the logo if a logo is set).\n  - If enabled, the theme displays either `header.title` or falls back to `.Site.Title`.\n- **Example (config):**\n  ```yaml\n  params:\n    theme:\n      header:\n        showTitle: true\n  ```\n\n\n#### `header.title`\u003ca id=\"setting-header-title\"\u003e\u003c/a\u003e\n\n- Type: String.\n- Default: Not set.\n- Purpose:\n  - Used only if `header.showTitle` is `true`. If empty or unset, the theme uses `.Site.Title`.\n  - Explicit header title as kind of text logo\n- **Example (config):**\n  ```yaml\n  params:\n    theme:\n      header:\n        showTitle: true\n        title: \"Go import path overview\"\n  ```\n\n\n#### `footer.additionalText`\u003ca id=\"setting-footer-additionalText\"\u003e\u003c/a\u003e\n\n- Type: String.\n- Default: `\"\"`\n- Purpose:\n  - Optional extra text in the footer. Markdown is allowed (but raw HTML will be filtered).\n  - If empty, no extra text is rendered.\n- **Example (config):**\n  ```yaml\n  params:\n    theme:\n      footer:\n        additionalText: \"© 2025 AMCE Inc. | [Contact Us](https://exmaple.com/contact)\"\n  ```\n\n#### `footer.additionalTextTrailingBreak`\u003ca id=\"setting-footer-additionalTextTrailingBreak\"\u003e\u003c/a\u003e\n\n- Type: Boolean.\n- Default: `true`\n- Purpose:\n  - Add a line break after `additionalText`.\n  - Useful if the line gets too long when combining `additionalText` with attribution toggles below.\n- **Example (config):**\n  ```yaml\n  params:\n    theme:\n      footer:\n        additionalText: \"© 2025 AMCE Inc. | [Contact Us](https://exmaple.com/contact)\"\n        additionalTextTrailingBreak: true # will add a \u003cbr\u003e after the additional text\n  ```\n\n\n#### `footer.showThemeInfo`\u003ca id=\"setting-footer-showThemeInfo\"\u003e\u003c/a\u003e\n\n- Type: Boolean.\n- Default: `true`\n- Purpose: Show a short theme attribution link in the footer.\n- **Example (config):**\n  ```yaml\n  params:\n    theme:\n      footer:\n        showThemeInfo: true\n  ```\n\n#### `footer.showTrademarksInfo`\u003ca id=\"setting-footer-showTrademarksInfo\"\u003e\u003c/a\u003e\n\n- Type: Boolean.\n- Default: `true`\n- Purpose: Show a link to Google's [Go Brand and Trademark Usage Guidelines](https://go.dev/brand) (recommended).\n- **Example (config):**\n  ```yaml\n  params:\n    theme:\n      footer:\n        showTrademarksInfo: true\n  ```\n\n#### `footer.showGoGopherInfo`\u003ca id=\"setting-footer-showGoGopherInfo\"\u003e\u003c/a\u003e\n\n- Type: Boolean.\n- Default: `true`\n- Purpose: Show attribution information about the  [Go Gopher](https://go.dev/blog/gopher) (recommended).\n- **Example (config):**\n  ```yaml\n  params:\n    theme:\n      footer:\n        showGoGopherInfo: true\n  ```\n\n\n## Usage\u003ca id=\"usage\"\u003e\u003c/a\u003e\n\n### Creating new entries\u003ca id=\"usage-add-entries\"\u003e\u003c/a\u003e\n\nAdd a new Markdown file **directly under the content root** for each module (no nested folders). For example:\n\n```\ncontent/hugo-theme-dev.md\n```\n\nYou can use the provided archetype to scaffold the front matter:\n\n```bash\nhugo new hugo-theme-dev.md\n# or explicitly: hugo new --kind default hugo-theme-dev.md\n```\n\nBelow is the **minimal** set you'll typically use (see [`archetypes/default.md`](archetypes/default.md) for the full, annotated version):\n\n```yaml\n---\ntitle: \"hugo-theme-dev\"\ntags:\n  - \"go-module\"\n  - \"hugo-module\"\nrepo:\n  root: \"github.com/foundata/hugo-theme-dev\"\n---\n```\n\nThe theme emits `\u003cmeta name=\"go-import\"\u003e` (and optionally `\u003cmeta name=\"go-source\"\u003e`) very early in the page `\u003chead\u003e` as recommended by Go's docs. The single package page also shows helpful commands and links for humans.\n\n\n### Deployment\u003ca id=\"deployment\"\u003e\u003c/a\u003e\n\nThis is a static site: deploy anywhere you can host static files (e.g. your small VM, GitHub Pages, Netlify, Cloudflare Pages, S3 + CDN). Ensure:\n\n1. The site is served at your `baseURL` host (e.g., `https://go.example.com/`).\n2. Requests like `https://go.example.com/hugo-theme-dev?go-get=1` return HTML that includes the `go-import` meta tag.\n3. Avoid JavaScript/CSS before the meta tag in `\u003chead\u003e` (the theme already places it first).\n\n\n## Troubleshooting\u003ca id=\"troubleshooting\"\u003e\u003c/a\u003e\n\n- **`no go-import meta tags`**: Verify the request path and that the HTML contains the correct `\u003cmeta name=\"go-import\" ...\u003e` tag. Try visiting the page with `?go-get=1`.\n- **Module not listed on the overview**: Check the page `tags` and `params.handleTags`.\n- **Imports still point to the old host**: Clear module cache (`go clean -modcache`) and ensure DNS/HTTPS and exact paths are correct.\n\n\n## Compatibility\u003ca id=\"compatibility\"\u003e\u003c/a\u003e\n\nThis project is compatible with Hugo (extended) ≥ v0.148.0 and should always work with the latest Hugo release (we usually run the latest Hugo ourselves and fix issues promptly). It has been tested at least with:\n\n- [Hugo extended v0.149.0](https://github.com/gohugoio/hugo/releases/tag/v0.149.0)\n- [Hugo extended v0.148.0](https://github.com/gohugoio/hugo/releases/tag/v0.148.0)\n\nIf your version isn't listed, it might still work. Just give it a try.\n\n\n## Contributing\u003ca id=\"contributing\"\u003e\u003c/a\u003e\n\nSee [`CONTRIBUTING.md`](./CONTRIBUTING.md) if you want to get involved.\n\nThis projects's functionality is mature, so there might be little activity on the repository in the future. Don't get fooled by this, the project is under active maintenance and used daily by the maintainers.\n\n\n## Licensing, copyright\u003ca id=\"licensing-copyright\"\u003e\u003c/a\u003e\n\n\u003c!--REUSE-IgnoreStart--\u003e\nCopyright (c) 2025 foundata GmbH (https://foundata.com)\n\nThis project is licensed under the GNU General Public License v3.0 or later (SPDX-License-Identifier: `GPL-3.0-or-later`), see [`LICENSES/GPL-3.0-or-later.txt`](LICENSES/GPL-3.0-or-later.txt) for the full text.\n\nThe [`REUSE.toml`](REUSE.toml) file provides detailed licensing and copyright information in a human- and machine-readable format. This includes parts that may be subject to different licensing or usage terms, such as third-party components. The repository conforms to the [REUSE specification](https://reuse.software/spec/). You can use [`reuse spdx`](https://reuse.readthedocs.io/en/latest/readme.html#cli) to create a [SPDX software bill of materials (SBOM)](https://en.wikipedia.org/wiki/Software_Package_Data_Exchange).\n\u003c!--REUSE-IgnoreEnd--\u003e\n\n[![REUSE status](https://api.reuse.software/badge/github.com/foundata/hugo-theme-govanity)](https://api.reuse.software/info/github.com/foundata/hugo-theme-govanity)\n\n\n## Author information\u003ca id=\"author-information\"\u003e\u003c/a\u003e\n\nThis project was created and is maintained by [foundata](https://foundata.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoundata%2Fhugo-theme-govanity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoundata%2Fhugo-theme-govanity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoundata%2Fhugo-theme-govanity/lists"}