From 3b50eacd15eb7f3c7731412da538dbb005c7f9f4 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Fri, 15 May 2026 22:33:40 +0000 Subject: [PATCH 1/8] Add Hugo-based docs site MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Build with `mise run build-docs`, preview with `mise run serve-docs`. The site mounts the existing `doc/libmaxminddb.md` and `doc/mmdblookup.md` as Hugo content so the source of truth stays in one place. A small pill nav lets readers move between the two pages. CSS is inlined in the layout template — no external dependencies. Same Charter serif + forest-green design as the MaxMind-DB spec site. For STF-448. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitignore | 2 + docs/hugo.toml | 17 ++ .../_default/_markup/render-heading.html | 4 + docs/layouts/_default/default.html | 215 ++++++++++++++++++ mise.lock | 126 ++++++++-- mise.toml | 9 + 6 files changed, 354 insertions(+), 19 deletions(-) create mode 100644 docs/hugo.toml create mode 100644 docs/layouts/_default/_markup/render-heading.html create mode 100644 docs/layouts/_default/default.html diff --git a/.gitignore b/.gitignore index d628511e..81f07296 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,8 @@ *~ .\#* .gh-pages +docs/.hugo_build.lock +docs/public/ /INSTALL /autom4te.cache /bin/country_lookup diff --git a/docs/hugo.toml b/docs/hugo.toml new file mode 100644 index 00000000..374077ea --- /dev/null +++ b/docs/hugo.toml @@ -0,0 +1,17 @@ +title = "libmaxminddb" +disableKinds = ["taxonomy"] + +[[cascade]] + layout = "default" + +[markup.highlight] + noClasses = true + style = "github" + +[[module.mounts]] + source = "../doc/libmaxminddb.md" + target = "content/_index.md" + +[[module.mounts]] + source = "../doc/mmdblookup.md" + target = "content/mmdblookup.md" diff --git a/docs/layouts/_default/_markup/render-heading.html b/docs/layouts/_default/_markup/render-heading.html new file mode 100644 index 00000000..4f4fcc0a --- /dev/null +++ b/docs/layouts/_default/_markup/render-heading.html @@ -0,0 +1,4 @@ + + {{- .Text | safeHTML -}} + # + diff --git a/docs/layouts/_default/default.html b/docs/layouts/_default/default.html new file mode 100644 index 00000000..30889f6a --- /dev/null +++ b/docs/layouts/_default/default.html @@ -0,0 +1,215 @@ + + + + + + {{- $title := or .Title .File.BaseFileName -}} + {{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ $title }} | {{ .Site.Title }}{{ end }} + + + + +
+ {{ .Content }} +
+ + diff --git a/mise.lock b/mise.lock index 2fa928ac..daba90ea 100644 --- a/mise.lock +++ b/mise.lock @@ -1,3 +1,5 @@ +# @generated - this file is auto-generated by `mise lock` https://mise.jdx.dev/dev-tools/mise-lock.html + [conda-packages.linux-arm64."linux-aarch64/_openmp_mutex-4.5-3_kmp_llvm"] url = "https://api.anaconda.org/download/conda-forge/_openmp_mutex/4.5/linux-aarch64/_openmp_mutex-4.5-3_kmp_llvm.conda" checksum = "sha256:5ec4d1d1dca8cc57e48132ec795e1df96082a7a69037f07add30d73d388df6ff" @@ -197,7 +199,11 @@ checksum = "sha256:644095227a3dd4559a07ce3f33d660d7e21f5e6b2a4227ce835fa156a4528 [[tools."conda:clang-format"]] version = "21.1.8" backend = "conda:clang-format" -"platforms.linux-arm64" = { checksum = "sha256:f36140c5cfa875bf9981a0fd978c54706227d15c93bedb6fa43c131b7e764b46", conda_deps = [ + +[tools."conda:clang-format"."platforms.linux-arm64"] +checksum = "sha256:f36140c5cfa875bf9981a0fd978c54706227d15c93bedb6fa43c131b7e764b46" +url = "https://api.anaconda.org/download/conda-forge/clang-format/21.1.8/linux-aarch64/clang-format-21.1.8-default_he95a3c9_0.conda" +conda_deps = [ "linux-aarch64/libclang-cpp21.1-21.1.8-default_he95a3c9_0", "linux-aarch64/libgcc-15.2.0-he277a41_5", "linux-aarch64/libzlib-1.3.1-h31becfc_0", @@ -211,8 +217,12 @@ backend = "conda:clang-format" "linux-aarch64/libllvm21-21.1.8-hfd2ba90_0", "linux-aarch64/libxml2-2.15.1-h49afab2_0", "linux-aarch64/clang-format-21-21.1.8-default_he95a3c9_0", -], url = "https://api.anaconda.org/download/conda-forge/clang-format/21.1.8/linux-aarch64/clang-format-21.1.8-default_he95a3c9_0.conda"} -"platforms.linux-x64" = { checksum = "sha256:7dde9b7439f38d239a827f71136f6a172d324fef183fb3ad334efb1701f62f2e", conda_deps = [ +] + +[tools."conda:clang-format"."platforms.linux-x64"] +checksum = "sha256:7dde9b7439f38d239a827f71136f6a172d324fef183fb3ad334efb1701f62f2e" +url = "https://api.anaconda.org/download/conda-forge/clang-format/21.1.8/linux-64/clang-format-21.1.8-default_h99862b1_0.conda" +conda_deps = [ "linux-64/zstd-1.5.7-hb8e6e7a_0", "linux-64/clang-format-21-21.1.8-default_h99862b1_0", "linux-64/libclang-cpp21.1-21.1.8-default_h99862b1_0", @@ -227,8 +237,12 @@ backend = "conda:clang-format" "linux-64/_openmp_mutex-4.5-3_kmp_llvm", "linux-64/libzlib-1.3.1-hd590300_0", "linux-64/libxml2-16-2.15.1-ha9997c6_0", -], url = "https://api.anaconda.org/download/conda-forge/clang-format/21.1.8/linux-64/clang-format-21.1.8-default_h99862b1_0.conda"} -"platforms.macos-arm64" = { checksum = "sha256:f968186fa56331fc1bbe6a5ced9eba08bb50c57e780e3daea863773e8b59d32f", conda_deps = [ +] + +[tools."conda:clang-format"."platforms.macos-arm64"] +checksum = "sha256:f968186fa56331fc1bbe6a5ced9eba08bb50c57e780e3daea863773e8b59d32f" +url = "https://api.anaconda.org/download/conda-forge/clang-format/21.1.8/osx-arm64/clang-format-21.1.8-default_hf3020a7_0.conda" +conda_deps = [ "osx-arm64/libxml2-2.15.1-h9329255_0", "osx-arm64/liblzma-5.8.2-h8088a28_0", "osx-arm64/libcxx-22.1.0.rc2-h919050e_0", @@ -240,8 +254,12 @@ backend = "conda:clang-format" "osx-arm64/clang-format-21-21.1.8-default_hf3020a7_0", "osx-arm64/libclang-cpp21.1-21.1.8-default_hf3020a7_0", "osx-arm64/libiconv-1.18-hfe07756_0", -], url = "https://api.anaconda.org/download/conda-forge/clang-format/21.1.8/osx-arm64/clang-format-21.1.8-default_hf3020a7_0.conda"} -"platforms.macos-x64" = { checksum = "sha256:477805cf0016cfa9738936f76d85970daefee72a1a9f2276df1a34581073b135", conda_deps = [ +] + +[tools."conda:clang-format"."platforms.macos-x64"] +checksum = "sha256:477805cf0016cfa9738936f76d85970daefee72a1a9f2276df1a34581073b135" +url = "https://api.anaconda.org/download/conda-forge/clang-format/21.1.8/osx-64/clang-format-21.1.8-default_hd70426c_0.conda" +conda_deps = [ "osx-64/libzlib-1.3.1-hd75f5a5_0", "osx-64/clang-format-21-21.1.8-default_hd70426c_0", "osx-64/libclang-cpp21.1-21.1.8-default_hd70426c_0", @@ -253,26 +271,96 @@ backend = "conda:clang-format" "osx-64/libllvm21-21.1.8-h56e7563_0", "osx-64/libcxx-22.1.0.rc2-hb6afd73_0", "osx-64/libxml2-2.15.1-h7b7ecba_0", -], url = "https://api.anaconda.org/download/conda-forge/clang-format/21.1.8/osx-64/clang-format-21.1.8-default_hd70426c_0.conda"} -"platforms.windows-x64" = { checksum = "sha256:dd8855c6b01dd986d55b67cef7b9532749493aeebbbb70fdc3f2b6cd348981e0", url = "https://api.anaconda.org/download/conda-forge/clang-format/21.1.8/win-64/clang-format-21.1.8-default_hac490eb_0.conda"} +] + +[tools."conda:clang-format"."platforms.windows-x64"] +checksum = "sha256:dd8855c6b01dd986d55b67cef7b9532749493aeebbbb70fdc3f2b6cd348981e0" +url = "https://api.anaconda.org/download/conda-forge/clang-format/21.1.8/win-64/clang-format-21.1.8-default_hac490eb_0.conda" [[tools."github:houseabsolute/precious"]] version = "0.10.2" backend = "github:houseabsolute/precious" -"platforms.linux-arm64" = { checksum = "sha256:8fbaead9f9626170549c3121e67d1bc81193b3bb086e29576f548aefa839fcc4", url = "https://github.com/houseabsolute/precious/releases/download/v0.10.2/precious-Linux-musl-arm64.tar.gz", url_api = "https://api.github.com/repos/houseabsolute/precious/releases/assets/345520042"} -"platforms.linux-x64" = { checksum = "sha256:3d717d906db338f63017766b07982dc9055773e1b3bec6d3f432d1f0ad9676bb", url = "https://github.com/houseabsolute/precious/releases/download/v0.10.2/precious-Linux-musl-x86_64.tar.gz", url_api = "https://api.github.com/repos/houseabsolute/precious/releases/assets/345519861"} -"platforms.macos-arm64" = { checksum = "sha256:04157c64459bb6ab029295b21b112077040ad2575b34508d84b19a839551cddb", url = "https://github.com/houseabsolute/precious/releases/download/v0.10.2/precious-macOS-arm64.tar.gz", url_api = "https://api.github.com/repos/houseabsolute/precious/releases/assets/345519985"} -"platforms.macos-x64" = { checksum = "sha256:9932defd246d0771530357463bdb55582557fd7381853cb4dc2074e36ad0cc84", url = "https://github.com/houseabsolute/precious/releases/download/v0.10.2/precious-macOS-x86_64.tar.gz", url_api = "https://api.github.com/repos/houseabsolute/precious/releases/assets/345519772"} -"platforms.windows-x64" = { checksum = "sha256:9d683d1730e302c646ccb90a23d313e7a548c8b23b5abf7d24e19ff6befe763d", url = "https://github.com/houseabsolute/precious/releases/download/v0.10.2/precious-Windows-msvc-x86_64.zip", url_api = "https://api.github.com/repos/houseabsolute/precious/releases/assets/345520544"} + +[tools."github:houseabsolute/precious"."platforms.linux-arm64"] +checksum = "sha256:8fbaead9f9626170549c3121e67d1bc81193b3bb086e29576f548aefa839fcc4" +url = "https://github.com/houseabsolute/precious/releases/download/v0.10.2/precious-Linux-musl-arm64.tar.gz" +url_api = "https://api.github.com/repos/houseabsolute/precious/releases/assets/345520042" + +[tools."github:houseabsolute/precious"."platforms.linux-x64"] +checksum = "sha256:3d717d906db338f63017766b07982dc9055773e1b3bec6d3f432d1f0ad9676bb" +url = "https://github.com/houseabsolute/precious/releases/download/v0.10.2/precious-Linux-musl-x86_64.tar.gz" +url_api = "https://api.github.com/repos/houseabsolute/precious/releases/assets/345519861" + +[tools."github:houseabsolute/precious"."platforms.macos-arm64"] +checksum = "sha256:04157c64459bb6ab029295b21b112077040ad2575b34508d84b19a839551cddb" +url = "https://github.com/houseabsolute/precious/releases/download/v0.10.2/precious-macOS-arm64.tar.gz" +url_api = "https://api.github.com/repos/houseabsolute/precious/releases/assets/345519985" + +[tools."github:houseabsolute/precious"."platforms.macos-x64"] +checksum = "sha256:9932defd246d0771530357463bdb55582557fd7381853cb4dc2074e36ad0cc84" +url = "https://github.com/houseabsolute/precious/releases/download/v0.10.2/precious-macOS-x86_64.tar.gz" +url_api = "https://api.github.com/repos/houseabsolute/precious/releases/assets/345519772" + +[tools."github:houseabsolute/precious"."platforms.windows-x64"] +checksum = "sha256:9d683d1730e302c646ccb90a23d313e7a548c8b23b5abf7d24e19ff6befe763d" +url = "https://github.com/houseabsolute/precious/releases/download/v0.10.2/precious-Windows-msvc-x86_64.zip" +url_api = "https://api.github.com/repos/houseabsolute/precious/releases/assets/345520544" + +[[tools.hugo]] +version = "0.161.1" +backend = "aqua:gohugoio/hugo" + +[tools.hugo."platforms.linux-arm64"] +checksum = "sha256:382371ec3208236fb854ced51781f859b6c27a7d066b8fe90594eba14ba76d00" +url = "https://github.com/gohugoio/hugo/releases/download/v0.161.1/hugo_0.161.1_linux-arm64.tar.gz" + +[tools.hugo."platforms.linux-arm64-musl"] +checksum = "sha256:382371ec3208236fb854ced51781f859b6c27a7d066b8fe90594eba14ba76d00" +url = "https://github.com/gohugoio/hugo/releases/download/v0.161.1/hugo_0.161.1_linux-arm64.tar.gz" + +[tools.hugo."platforms.linux-x64"] +checksum = "sha256:fae28bf7909c1a42d1365b89d2e9e3d4194fbe5968ae0dd5504f562381018a1d" +url = "https://github.com/gohugoio/hugo/releases/download/v0.161.1/hugo_0.161.1_linux-amd64.tar.gz" + +[tools.hugo."platforms.linux-x64-musl"] +checksum = "sha256:fae28bf7909c1a42d1365b89d2e9e3d4194fbe5968ae0dd5504f562381018a1d" +url = "https://github.com/gohugoio/hugo/releases/download/v0.161.1/hugo_0.161.1_linux-amd64.tar.gz" + +[tools.hugo."platforms.macos-arm64"] +checksum = "sha256:b12e1cbebacf61f9cf67e0046c835142e70c829da7c16b05c1ec64a68885ee80" +url = "https://github.com/gohugoio/hugo/releases/download/v0.161.1/hugo_0.161.1_darwin-universal.pkg" + +[tools.hugo."platforms.macos-x64"] +checksum = "sha256:b12e1cbebacf61f9cf67e0046c835142e70c829da7c16b05c1ec64a68885ee80" +url = "https://github.com/gohugoio/hugo/releases/download/v0.161.1/hugo_0.161.1_darwin-universal.pkg" + +[tools.hugo."platforms.windows-x64"] +checksum = "sha256:7f8d030b37600c60bf2a782611257e6a768934fbe7724c1f3a1a501e6724cf0d" +url = "https://github.com/gohugoio/hugo/releases/download/v0.161.1/hugo_0.161.1_windows-amd64.zip" [[tools.node]] version = "25.6.1" backend = "core:node" -"platforms.linux-arm64" = { checksum = "sha256:90fea701897ecb424aafa2824539476598437ad9f21e649732a85cc2d955d845", url = "https://nodejs.org/dist/v25.6.1/node-v25.6.1-linux-arm64.tar.gz"} -"platforms.linux-x64" = { checksum = "sha256:3809fdbfd54829bad363b9db8e96ca3600509e2ff20ede74181cfc1ca8451ce3", url = "https://nodejs.org/dist/v25.6.1/node-v25.6.1-linux-x64.tar.gz"} -"platforms.macos-arm64" = { checksum = "sha256:a80cb252d170a4730f78f5950cf19a46106f156e5886e5c1cc8c5602aea60243", url = "https://nodejs.org/dist/v25.6.1/node-v25.6.1-darwin-arm64.tar.gz"} -"platforms.macos-x64" = { checksum = "sha256:3b68f847d9d8861c7c8bfef32c540d14f6ca18bfcbf5f6495a595b9529063a9b", url = "https://nodejs.org/dist/v25.6.1/node-v25.6.1-darwin-x64.tar.gz"} -"platforms.windows-x64" = { checksum = "sha256:0ae2300cdf44c399b5b351edbefb3534d1342a6fabd64302ca8c8e2fb86b0445", url = "https://nodejs.org/dist/v25.6.1/node-v25.6.1-win-x64.zip"} + +[tools.node."platforms.linux-arm64"] +checksum = "sha256:90fea701897ecb424aafa2824539476598437ad9f21e649732a85cc2d955d845" +url = "https://nodejs.org/dist/v25.6.1/node-v25.6.1-linux-arm64.tar.gz" + +[tools.node."platforms.linux-x64"] +checksum = "sha256:3809fdbfd54829bad363b9db8e96ca3600509e2ff20ede74181cfc1ca8451ce3" +url = "https://nodejs.org/dist/v25.6.1/node-v25.6.1-linux-x64.tar.gz" + +[tools.node."platforms.macos-arm64"] +checksum = "sha256:a80cb252d170a4730f78f5950cf19a46106f156e5886e5c1cc8c5602aea60243" +url = "https://nodejs.org/dist/v25.6.1/node-v25.6.1-darwin-arm64.tar.gz" + +[tools.node."platforms.macos-x64"] +checksum = "sha256:3b68f847d9d8861c7c8bfef32c540d14f6ca18bfcbf5f6495a595b9529063a9b" +url = "https://nodejs.org/dist/v25.6.1/node-v25.6.1-darwin-x64.tar.gz" + +[tools.node."platforms.windows-x64"] +checksum = "sha256:0ae2300cdf44c399b5b351edbefb3534d1342a6fabd64302ca8c8e2fb86b0445" +url = "https://nodejs.org/dist/v25.6.1/node-v25.6.1-win-x64.zip" [[tools."npm:prettier"]] version = "3.8.1" diff --git a/mise.toml b/mise.toml index 83e93536..ba199c03 100644 --- a/mise.toml +++ b/mise.toml @@ -8,7 +8,16 @@ disable_backends = [ ] [tools] +hugo = "latest" node = "latest" "pipx:clang-format" = "21.1.8" "github:houseabsolute/precious" = "latest" "npm:prettier" = "latest" + +[tasks.build-docs] +description = "Build the docs site with Hugo" +run = "hugo --source docs --minify" + +[tasks.serve-docs] +description = "Serve the docs site locally with Hugo dev server" +run = "hugo server --source docs" From c57d88baed5aef08410560b2bdaae28abca0bdac Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Fri, 15 May 2026 22:34:09 +0000 Subject: [PATCH 2/8] Add GitHub Pages deployment workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .github/workflows/pages.yml | 54 +++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/pages.yml diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 00000000..eb1b31bd --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,54 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: ["main"] + workflow_dispatch: + +permissions: {} + +concurrency: + group: pages + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Setup mise + uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3.6.1 + with: + cache: true + + - name: Build docs + env: + HUGO_BASEURL: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/ + run: mise run build-docs + + - name: Configure Pages + uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 + + - name: Upload artifact + uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0 + with: + path: docs/public + + deploy: + needs: build + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 From 99eb914a3e9a376145a8ffcddb5bd662a66240e8 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Fri, 15 May 2026 22:34:29 +0000 Subject: [PATCH 3/8] Remove gh-pages publishing from release script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The release script no longer needs to clone the gh-pages branch and regenerate Jekyll index/mmdblookup pages — the new Hugo workflow on main owns the docs site, and the doc/*.md files are now mounted as content directly. There is no versioned doc tree on gh-pages to preserve for this repo. For STF-448. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitignore | 1 - dev-bin/release.sh | 43 ------------------------------------------- 2 files changed, 44 deletions(-) diff --git a/.gitignore b/.gitignore index 81f07296..1e9ab789 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ */.libs *~ .\#* -.gh-pages docs/.hugo_build.lock docs/public/ /INSTALL diff --git a/dev-bin/release.sh b/dev-bin/release.sh index 4e949c49..258fad2a 100755 --- a/dev-bin/release.sh +++ b/dev-bin/release.sh @@ -111,45 +111,6 @@ make check make clean make safedist -if [ ! -d .gh-pages ]; then - echo "Checking out gh-pages in .gh-pages" - git clone -b gh-pages git@github.com:maxmind/libmaxminddb.git .gh-pages - pushd .gh-pages -else - echo "Updating .gh-pages" - pushd .gh-pages - git pull -fi - -if [ -n "$(git status --porcelain)" ]; then - echo ".gh-pages is not clean" >&2 - exit 1 -fi - -index=index.md -cat <$index ---- -layout: default -title: libmaxminddb - a library for working with MaxMind DB files -version: $version ---- -EOF - -cat ../doc/libmaxminddb.md >>$index - -mmdblookup=mmdblookup.md -cat <$mmdblookup ---- -layout: default -title: mmdblookup - a utility to look up an IP address in a MaxMind DB file -version: $version ---- -EOF - -cat ../doc/mmdblookup.md >>$mmdblookup - -git commit -m "Updated for $version" -a - read -r -e -p "Push to origin? (y/n) " should_push if [ "$should_push" != "y" ]; then @@ -159,8 +120,4 @@ fi git push -popd - -git push - gh release create --target "$(git branch --show-current)" -t "$version" -n "$notes" "$version" "$dist" From b284fb1a60786c69a70fbf550a199136305e3d0b Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Wed, 20 May 2026 14:29:32 +0000 Subject: [PATCH 4/8] Disable taxonomy, term, and RSS pages `disableKinds = ["taxonomy"]` only disables the taxonomy list page; post-Hugo-0.73 individual term pages are a separate kind. The site declares no taxonomies, so neither list nor term pages have content, but the config now matches its stated intent. Disabling RSS also suppresses an empty `index.xml` that nothing subscribes to. Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/hugo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hugo.toml b/docs/hugo.toml index 374077ea..0ddbc762 100644 --- a/docs/hugo.toml +++ b/docs/hugo.toml @@ -1,5 +1,5 @@ title = "libmaxminddb" -disableKinds = ["taxonomy"] +disableKinds = ["taxonomy", "term", "RSS"] [[cascade]] layout = "default" From 9fa9c0e699723b7d0377995eceada51a746c651f Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Wed, 20 May 2026 14:29:32 +0000 Subject: [PATCH 5/8] Add a 404 page layout Hugo's built-in fallback renders an empty `
` for the 404 page. Provide a minimal "Page not found" body with a link back to the site home, reusing the Charter/forest-green design tokens from the main layout. Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/layouts/404.html | 58 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 docs/layouts/404.html diff --git a/docs/layouts/404.html b/docs/layouts/404.html new file mode 100644 index 00000000..3662eb6e --- /dev/null +++ b/docs/layouts/404.html @@ -0,0 +1,58 @@ + + + + + + Page not found | {{ .Site.Title }} + + + +
+

Page not found

+

+ The page you're looking for doesn't exist. Return to + {{ .Site.Title }}. +

+
+ + From 744c119288cea32348411a679779b75684fcc0c1 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Wed, 20 May 2026 14:29:32 +0000 Subject: [PATCH 6/8] Guard .File.BaseFileName in title for virtual pages `.File` is nil on virtual pages (e.g., taxonomy listings before they were disabled). Wrap with `with .File` so the title rendering is null-safe even if future virtual pages get enabled. Co-Authored-By: Claude Opus 4.7 (1M context) From 8205a602cfad8a244a00c9bfe611cf0b5b59e3eb Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Wed, 20 May 2026 14:30:40 +0000 Subject: [PATCH 7/8] Preserve .html URLs with uglyURLs The old Jekyll site used `permalink: /:title.html` and served pages at `/mmdblookup.html`. Hugo's default pretty URLs would emit `/mmdblookup/`, breaking existing external links to the old paths. Set `uglyURLs = true` so Hugo writes `.html` suffixes for non-home pages, matching the old behavior exactly. Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/hugo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/hugo.toml b/docs/hugo.toml index 0ddbc762..bdcc3882 100644 --- a/docs/hugo.toml +++ b/docs/hugo.toml @@ -1,4 +1,5 @@ title = "libmaxminddb" +uglyURLs = true disableKinds = ["taxonomy", "term", "RSS"] [[cascade]] From 58f8000c06b724f38f85ba78b8c64bbc9c4896a6 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Wed, 20 May 2026 16:10:27 +0000 Subject: [PATCH 8/8] Move layout CSS to a shared file Extracts the inline ` + {{- $css := resources.Get "css/main.css" | fingerprint -}} +
diff --git a/docs/layouts/_default/default.html b/docs/layouts/_default/default.html index 30889f6a..11a157cc 100644 --- a/docs/layouts/_default/default.html +++ b/docs/layouts/_default/default.html @@ -5,201 +5,13 @@ {{- $title := or .Title .File.BaseFileName -}} {{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ $title }} | {{ .Site.Title }}{{ end }} - + {{- $css := resources.Get "css/main.css" | fingerprint -}} +