Skip to content

fix: fail the build when two blog posts share a slug - #268

Open
soloturn wants to merge 1 commit into
masterfrom
fix/duplicate-blog-slug-check
Open

soloturn wants to merge 1 commit into
masterfrom
fix/duplicate-blog-slug-check

Conversation

@soloturn

Copy link
Copy Markdown
Contributor

AI-assisted change proposal. Filed by agent driven by @soloturn via GDD.

Summary

  • A blog post's URL is its kebab-cased title, and a second post with the same title silently replaced the first.
  • The build now fails instead, with a message naming both post directories.
  • Dates are not added to URLs: that would break every existing blog link, and the check covers the real risk.

Test plan

  • Normal build passes with the current 37 posts
  • With a copy of a post planted, the build fails with Blog posts A and B both map to /blog/<slug>; retitle one.
  • astro check, ESLint and Prettier pass

Related

Slugs come from the title, and a repeat silently overwrote the earlier post. generateId now throws naming both directories. Checked with a planted duplicate. Refs #213.

Co-Authored-By: soloturn <soloturn@gmail.com>
@coderabbitai

coderabbitai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 58eeaa76-b008-4599-a5ed-afd29047723f
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch has not been deployed

No deployments
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