Skip to content
This repository was archived by the owner on Aug 4, 2026. It is now read-only.

Commit 5157c71

Browse files
committed
fix: point the Netlify project at the redirects too
The PR that switched the GitHub Pages deploy to redirects missed that this repository is built by a Netlify project as well. That project has no config in the repository, so its build command lives in Netlify's web UI, where a change to .github/workflows/deploy.yml cannot reach it — it would have gone on building and publishing the old mkdocs site regardless. Two consequences, one of them visible right now: the deploy preview on this pull request is the old site, which makes the redirects look broken to anyone who clicks it, and any production deployment of that project is a third live copy of the old site that neither the Pages redirects nor archiving would touch. Adds a netlify.toml so the build is defined in version control. It runs the same redirect builder, and declares real 301s — Netlify can serve those, unlike Pages — with the /projects/ rule ahead of the catch-all, since Netlify takes the first match and that is the one page that did not survive as its own URL. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U9zFxq8V4qxG4aMzJhGBFn
1 parent 4291bc7 commit 5157c71

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ verifies the map still covers every URL the old site served. GitHub Pages has
3434
no server-side redirect table, so each stub is a `rel=canonical` plus a
3535
`<meta refresh>` — the canonical is what moves search ranking to the new URL.
3636

37+
Two hosts serve this repository, so both are covered: GitHub Pages gets the
38+
stubs, and `netlify.toml` gives the Netlify project real 301s and stops it
39+
building the old site from a command configured in its web UI.
40+
3741
## Why the redirects come before the archive
3842

3943
Archiving a repository makes it read-only and stops its Actions from running,

netlify.toml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This repository is also wired to a Netlify project, which until now built the
2+
# mkdocs site from a command configured in Netlify's web UI. That command is
3+
# invisible from here and outlives any change to the GitHub Actions workflow,
4+
# so without this file Netlify would keep publishing the old site after the
5+
# GitHub Pages deploy had been switched to redirects — and the deploy preview
6+
# on a pull request would show the old site too, which makes the redirects look
7+
# broken when they are not.
8+
#
9+
# Settings here override the UI, so the build is defined in version control.
10+
11+
[build]
12+
command = "python scripts/build_redirects.py"
13+
publish = "site"
14+
15+
# Netlify, unlike GitHub Pages, can serve a real 301. These take precedence
16+
# over the stub files the build writes, which stay as the fallback for hosts
17+
# without a redirect table.
18+
#
19+
# Order matters: Netlify takes the first rule that matches, so the one page
20+
# that did not survive as its own URL has to come before the catch-all.
21+
[[redirects]]
22+
from = "/projects/*"
23+
to = "https://commit-check.com/"
24+
status = 301
25+
force = true
26+
27+
# Everything else kept its path on the new site, so the tail is carried across
28+
# unchanged. This also covers URLs the stub list does not enumerate.
29+
[[redirects]]
30+
from = "/*"
31+
to = "https://commit-check.com/:splat"
32+
status = 301
33+
force = true

0 commit comments

Comments
 (0)