- Static Site Generator: Hugo + TypeScript +
- Hosting: Cloudflare Pages
This project uses mise to manage tool versions (Node.js, Hugo, pnpm, precious, Dart Sass).
curl https://mise.jdx.dev/install.sh | shSee the mise installation guide for other installation methods.
mise trust # Trust the mise.toml configuration
mise install # Install all required tools (Node, Hugo, pnpm, etc.)
pnpm install # Install Node.js dependenciesYou should install our pre-commit hook. You can do this from your checkout
by running git/setup.sh. These hooks do things like ensure that the code you
commit is tidy and passes various linter checks.
The development server watches files, rebuilds the site, and reloads the browser when files change.
hugo serverThe static/_headers file is automatically generated from
bin/_headers.config.ts during the build process. Do not edit static/_headers
directly.
- Edit
bin/_headers.config.ts(the source of truth with readable format and TypeScript type safety) - Test your changes locally by generating the headers file:
pnpm run build:headers
- Commit only
bin/_headers.config.ts- the_headersfile will be generated automatically during deployment
The headers file is generated automatically during deployment via build.sh.
You can also generate it manually for local testing with pnpm run build:headers.
Whenever you create your first release note for a product category for a new year:
- Add a file called
<year>.mdto the/content/<product>/release-notesfolder. (e.g.,/content/geoip/release-notes/2024.md) - Add the header to your new release note file with the title:<Product> Release Notes(e.g.,GeoIP Release Notes) and draft tofalse. - Add the email subscription notification to the top of the new file. - Change the
title:field in the previous year'smdfile to read:<Product> Release Notes - <Year> Archive(e.g.,GeoIP Release Notes - 2023 Archive) - Remove the email subscription notification from the top of the archived file. - Update link to the release notes in the navigation menu (
hugo.toml) to point to the current year's path. - Update the URLs in the redirects file (
static/_redirects) to the current year's path.
To do this, use the create-example-csv-zips-for-dev-site script in the
internal oneoffs repository.
In the markdown (mdx) file, add a description to the frontmatter located at
the top of the file:
---
draft: false
title: GeoIP is the best
description: GeoIP is the best IP Intelligence product suite ever made
----
Add your image to the static/images directory.
-
In the markdown (mdx) file, add the path to the
imagekey in the frontmatter located at the top of the file. Do not includestaticto the path. For example, if your file is atstatic/images/geoip2-so-cool.gif, your frontmatter would look like:
---
draft: false
title: GeoIP is the best
description: GeoIP is the best IP Intelligence product suite ever made
image: /images/geoip2-so-cool.gif
---