Repository navigation
Conversation
…hinkmill#340) - Support multi-segment wildcard collection paths without non-serializable callbacks - Map slug segments to schema fields deterministically - Maintain full compatibility with single slugField collections - Include comprehensive unit tests across path parsing and reader listing - Add changeset and update collection documentation Fixes Thinkmill#340 /claim Thinkmill#340
rxhtt
requested review from
BarnabyBishop,
JedWatson and
emmatown
as code owners
November 10, 2026 22:40
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #340 using the static, deterministic API proposed and discussed in the issue: collections can declare multiple slug fields that map onto the
*segments of the collectionpathin order.An entry with locale
enand title slugmy-postis stored atsrc/content/blog/en/my-post. The entry's slug is the segments joined with a slash (en/my-post), which keeps tree listing, routing, the reader, and GitHub/local storage backends deterministic — without non-serializable function callbacks.slugFieldcollections behave exactly as before.slugFields.length, every entry must be a slug field, and the last entry must be the primaryslugField.slug-fields.test.ts(100% green ontsc --noEmitand vitest).Fixes #340
/claim #340