Skip to content

Renaming a post slug has no documented redirect requirement — external links break permanently #173

Description

@ooloth

Current state

A developer who renames a post slug to improve its title will push the change without an entry in public/_redirects, permanently breaking all external links, search engine index entries, and newsletter or social shares pointing to the old URL. The _redirects.test.ts validates only format, not completeness, so the gap is invisible in CI. There is no comment or README section explaining that _redirects is permanent link-preservation infrastructure or that slug renames require a new entry. The feedId field in posts provides RSS feed stability, but the web URL has no equivalent protection explained anywhere.

Ideal state

  • A comment block at the top of public/_redirects states that it is permanent SEO and link-preservation infrastructure, that every slug rename requires a new 301 entry, and that removing any existing entry permanently breaks all links to that URL.
  • README.md or CLAUDE.md includes a "Renaming a post" note that identifies adding a _redirects entry as a required step.
  • A developer who renames a slug discovers the required action without asking anyone.

Out of scope

  • Automating redirect generation from git history.
  • Adding completeness validation to _redirects.test.ts (a separate improvement).

Starting points

  • public/_redirects — where the warning comment should be added at the top of the file
  • io/notion/getPosts.ts — the feedId field, the analogous RSS-stability mechanism to reference as prior art

QA plan

  1. Read the top of public/_redirects — expect a comment block explaining the SEO purpose and the slug-rename requirement.
  2. Read README.md or CLAUDE.md — expect a note that renaming a post slug requires adding a _redirects entry.
  3. Confirm _redirects.test.ts still passes after the comment is added.

Done when

public/_redirects has a comment block at the top that makes the rename-requires-redirect invariant discoverable, and README.md or CLAUDE.md references it for developers performing slug renames.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions