Skip to content

Add a CI gate for removed docs pages - #582

Open
tedmalone wants to merge 1 commit into
mainfrom
ted/removed-pages-gate
Open

tedmalone wants to merge 1 commit into
mainfrom
ted/removed-pages-gate

Conversation

@tedmalone

@tedmalone tedmalone commented Nov 21, 2026 •

Copy link
Copy Markdown

Why

Docs pages that were removed or renamed kept returning 404 on smallstep.com. The page list lives here and the redirects lived in the site repo, and nothing connected the two. The four guides folded into protect-wireless-networks and the removed mutual-tls-aws tutorial are recent examples.

What changes

  • redirects.json: the list of old docs URLs and where they go now. It starts with 19 entries for URLs that are returning 404 today.
  • removed-pages check: runs on every pull request. It compares the pages served before and after the change and fails when:
    • a page that was served disappears and has no redirects.json entry
    • an entry points to a /docs page that isn't served
    • an entry's from is still a live page, is duplicated, or isn't written as a plain /docs/... path
    • an entry is removed and no page is served at that URL
  • CONTRIBUTING.md: a "Removing or renaming a page" section.
  • trigger-algolia-index.yml: a change to redirects.json now notifies the site, so a redirect-only change takes effect without waiting for the cache to expire.

The check is a Node script with no dependencies and needs no secrets, so it runs on pull requests from forks.

Merge order

The site reads redirects.json starting with smallstep/smallstep.com#1283. Until that is deployed, the entries here do nothing, so this should merge after it.

Testing

  • 13 unit tests for the check pass (node --test .github/scripts/check-removed-pages.test.mjs).
  • The check passes against current main (343 pages served).
  • Replaying the commit that folded the four wireless guides into one page fails the check and names all four removed URLs.
  • vale and the Markdown link check were not run locally; both pass in CI on this pull request.

🤖 Generated with Claude Code

Pages removed or renamed here kept returning 404 on smallstep.com
because nothing required a redirect. Old URLs now go in
redirects.json, and a pull request check fails when a served page
disappears without an entry there, or when an entry points at a
docs page that doesn't exist.

redirects.json starts with the URLs that are currently returning
404, including the four guides folded into protect-wireless-networks
and the removed mutual-tls-aws tutorial.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@tedmalone
tedmalone requested a review from a team as a code owner November 21, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant