Skip to content

feat(core): add configurable slug collision policy - #7992

Open
ryanvilbrandt wants to merge 1 commit into
decaporg:mainfrom
comic-git:feat/slug-collision-policy
Open

feat(core): add configurable slug collision policy#7992
ryanvilbrandt wants to merge 1 commit into
decaporg:mainfrom
comic-git:feat/slug-collision-policy

Conversation

@ryanvilbrandt

@ryanvilbrandt ryanvilbrandt commented Sep 13, 2026

Copy link
Copy Markdown

Summary

Add a slug_collision option for folder collections that controls how Decap CMS handles a generated slug that already belongs to another entry.

  • suffix preserves the existing behavior and remains the default.
  • reject stops the save and reports the conflicting entry path.
  • Collision checks cover loaded entries, published entries, and unpublished editorial-workflow entries.
  • The option is included in the configuration schema and public TypeScript definitions.

This lets projects whose content structure requires unique generated paths reject collisions without changing behavior for existing configurations.

This implementation accompanies decaporg/decap-website#173

Test plan

  • corepack pnpm run test (1,390 tests passed; 2 suites skipped)
  • corepack pnpm exec jest packages/decap-cms-core/src/__tests__/backend.spec.js packages/decap-cms-core/src/constants/__tests__/configSchema.spec.js --runInBand (106 tests passed)
  • corepack pnpm --filter decap-cms build
  • External Playwright integration coverage for unique entries plus exact and normalization-induced collisions (6 tests passed)

Checklist

@ryanvilbrandt
ryanvilbrandt requested a review from a team as a code owner September 13, 2026 22:42
@netlify

netlify Bot commented Sep 13, 2026

Copy link
Copy Markdown

Deploy Preview for decap-cms ready!

Name Link
🔨 Latest commit befada7
🔍 Latest deploy log https://app.netlify.com/projects/decap-cms/deploys/6aa726f15650c20008436df0
😎 Deploy Preview https://deploy-preview-7992--decap-cms.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ryanvilbrandt

ryanvilbrandt commented Sep 13, 2026

Copy link
Copy Markdown
Author

Hello Decap team! 👋

I want to say that I love your CMS, and I'm excited to integrate it into my own project. I'm running into minor issues with that process, and I hope to be able to resolve them and also contribute beneficially to upstream in the process with my PRs.

I'm happy to work with you to make sure my work meets your standards of quality, for this PR and ones I'll be putting up in the near future.

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