Skip to content

Deploy docs site with Hugo and GitHub Actions#171

Open
oschwald wants to merge 3 commits into
mainfrom
greg/stf-448
Open

Deploy docs site with Hugo and GitHub Actions#171
oschwald wants to merge 3 commits into
mainfrom
greg/stf-448

Conversation

@oschwald
Copy link
Copy Markdown
Member

Summary

Migrates the docs site from Jekyll on gh-pages to a Hugo build deployed
via GitHub Actions. All CSS is now inlined in the layout template — no
external CDN dependencies.

  • Hugo site lives under docs/ on main; the home page mounts
    README.md so the source of truth stays in one place
  • .github/workflows/pages.yml builds with mise run build-docs and
    deploys via the GitHub Actions Pages environment
  • dev-bin/make-release.sh no longer clones the gh-pages branch or
    regenerates index.md

Same design as MaxMind-DB PR #221: Charter serif body text, forest-green
accent on field-name headings, hover # anchor links.

Preview locally with mise run serve-docs.

For STF-448.

Post-merge steps

  1. Apply Terraform in mm_website to switch Pages source from
    gh-pages to GitHub Actions
  2. Verify the site at https://maxmind.github.io/mod_maxminddb/
  3. Delete the legacy gh-pages branch

Test plan

  • mise run build-docs succeeds with no warnings
  • grep -r static-gh docs/ returns nothing
  • Rendered <title> and <h1> are correct; CSS is inlined
  • Build job passes in CI (deploy only runs on main)
  • After merge + Terraform apply, verify the live site renders correctly

🤖 Generated with Claude Code

oschwald and others added 3 commits May 15, 2026 22:23
Build with `mise run build-docs`, preview with `mise run serve-docs`.

The site renders the README as the home page via a module mount; CSS is
inlined in the layout template with no external dependencies. Hover any
heading to reveal a `#` anchor link.

Charter serif body text, forest-green accent on field-name headings —
same design as the MaxMind-DB spec site.

For STF-448.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deploys the Hugo docs site on push to main. Uses the same mise-action
pattern as PR #221. All actions are SHA-pinned.

After merge, the Pages source needs to flip from "Deploy from a branch"
(gh-pages) to "GitHub Actions" — handled in the mm_website Terraform PR.
The legacy gh-pages branch can then be deleted.

For STF-448.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The release script no longer needs to clone the gh-pages branch and
regenerate a Jekyll index page from README.md — the new Hugo workflow
on main owns the docs site, and there is no versioned doc tree on
gh-pages for this repo to preserve.

For STF-448.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request migrates the project's documentation from a manual Jekyll-based process to Hugo. It removes the legacy site generation logic from the release script, updates the .gitignore, and adds Hugo configuration, templates, and a mise.toml for environment management. Feedback recommends restoring the descriptive site title for improved SEO and pinning the Hugo version to ensure deterministic builds.

Comment thread docs/hugo.toml
@@ -0,0 +1,14 @@
baseURL = "https://maxmind.github.io/mod_maxminddb/"
title = "mod_maxminddb"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The site title has been significantly shortened compared to the previous Jekyll implementation. The original title (mod_maxminddb - an Apache module that allows you to query MaxMind DB files) provided much better context for search engine results and browser tabs. Consider restoring the descriptive title to maintain SEO and user experience.

Suggested change
title = "mod_maxminddb"
title = "mod_maxminddb - an Apache module that allows you to query MaxMind DB files"

Comment thread mise.toml
]

[tools]
hugo = "latest"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using latest for the Hugo version can lead to non-deterministic builds if a future update introduces breaking changes or alters rendering behavior. It is recommended to pin a specific version to ensure consistency across different development environments and CI/CD pipelines.

Suggested change
hugo = "latest"
hugo = "0.143.1"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant