go.olly.garden

Repository guidance

Purpose

This private repository publishes the public go.olly.garden vanity import service through GitHub Pages. Each tracked index.html maps a stable OllyGarden module path to its source repository and redirects browsers to pkg.go.dev.

The site is operational infrastructure for Go modules. A malformed path or metadata value can break module discovery, so keep changes small and validate the exact import path before merging.

Repository map

The repository is licensed under Apache License 2.0. Preserve LICENSE unless the owning team makes an explicit licensing decision.

Vanity page contract

For a module path go.olly.garden/<path>, its index.html must contain:

For most modules, <path> and <repository> are the same. Do not assume that for nested module paths: confirm the module declaration and source repository. Use lowercase directory names containing only letters, digits, and hyphens.

Adding or changing a module

  1. Confirm the source repository and the exact module declaration in its go.mod.
  2. Check that no existing page owns the requested vanity path.
  3. Create or update <path>/index.html using an existing page with the same path shape as the template.
  4. Add the exact vanity path to the alphabetical module inventory in README.md.
  5. Validate all three URLs in the page and review the diff for unrelated changes.
  6. After deployment, request the vanity URL with ?go-get=1 and confirm the served go-import metadata.

Do not add a redirect for a repository that does not declare the matching vanity module path. Do not change CNAME, GitHub Pages settings, or an existing module mapping as part of an unrelated addition.

Validation

Run the checks relevant to the change:

Change Required validation
Any change git diff --check
Guidance or inventory Check every changed relative Markdown link
Vanity page Confirm the vanity path, source repository, pkg.go.dev redirect, and body link agree
All vanity pages Run an automated scan across every tracked index.html for the page contract
Deployment-sensitive change Confirm GitHub Pages still targets main at / and retains the verified custom domain
Post-deployment curl -fsSL 'https://go.olly.garden/<path>?go-get=1' and inspect the go-import tag

There is no build step. The deployable output is the tracked static HTML. A local HTTP server can help inspect browser redirects, but it does not prove Go module discovery; verify the metadata directly.

Change conventions