This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
MaxMind developer documentation site built with Hugo, TypeScript, and SCSS. Hosted on Cloudflare Pages.
Tool versions are managed by mise (Hugo, pnpm, Node.js, precious, Dart Sass). See mise.toml for versions.
mise trust && mise install # Install all required tools
pnpm install # Install Node.js dependencies
git/setup.sh # Install pre-commit hook (runs precious lint --staged)- Dev server:
hugo server - Build:
./build.sh - Lint changed files:
precious lint -g - Tidy changed files:
precious tidy -g - Lint all files:
precious lint --all - Format rawhtml content:
pnpm run format:rawhtml <files> - Generate Cloudflare headers:
pnpm run build:headers
There are no unit tests. Linting is the primary quality gate.
precious (configured in .precious.toml) orchestrates all linting and formatting. Use precious rather than running individual tools. It runs:
- ESLint + Prettier on TypeScript (
assets/js/,bin/) - Stylelint on SCSS (
assets/scss/) - Prettier (markdown parser) on content (
content/**/*.md,assets/**/*.md) - CSpell for spell checking markdown (custom dictionary:
stopwords.txt) - format-rawhtml for content files using
{{< rawhtml >}}shortcodes - shortcode-parity check ensuring every
.htmlshortcode has a.mdcounterpart - prettierignore-rawhtml check ensuring rawhtml files are in
.prettierignore
Files using {{< rawhtml >}} are excluded from prettier-markdown (listed in .prettierignore) and instead formatted by format:rawhtml.
- TypeScript: Single quotes, semicolons, 100-char max line length, strict mode. ESLint flat config in
eslint.config.mjs. - SCSS: Alphabetical property ordering, max nesting depth 4. Config in
.stylelintrc.cjs. - Markdown: Prose wrap always, Oxford commas. Raw HTML is allowed (MD033 disabled).
Two main product sections under content/:
geoip/— GeoIP database and web service documentationminfraud/— minFraud fraud detection service documentation
Each has subsections for docs (databases, web-services), release notes, and guides.
hugo.toml defines the sidebar navigation menus (menus.geoip, menus.minfraud, menus.general). Menu structure lives here, not in frontmatter.
Hugo generates both HTML and Markdown output formats for every page (configured via [outputs] and [outputFormats]).
Located in layouts/shortcodes/. Every shortcode must have both an .html implementation and a .md counterpart (enforced by linter). Key shortcodes: alert, codeset, schema-table, geoip-schema-row, minfraud-schema-row, rawhtml, release-note, snippet.
layouts/_default/baseof.html— root templatelayouts/partials/— reusable partials (head, header, footer, sidebar, page)layouts/_default/_markup/— Goldmark render hooks
Pages support title, description (SEO), image (social sharing, path without static/ prefix), and draft.
hugo.toml— Hugo config and navigation menus.precious.toml— Linting/formatting orchestrationbin/_headers.config.ts— Cloudflare Pages headers (source of truth; never editstatic/_headersdirectly)static/_redirects— URL redirectsstopwords.txt— Custom spell check dictionary
Always use correct capitalization: MaxMind, minFraud, GeoIP, GeoLite.