Skip to content

feat(collection): add slugFields for multi-segment collection paths - #1640

Open
bkindler-autodev wants to merge 2 commits into
Thinkmill:mainfrom
bkindler-autodev:feat/collection-slug-fields
Open

bkindler-autodev wants to merge 2 commits into
Thinkmill:mainfrom
bkindler-autodev:feat/collection-slug-fields

Conversation

@bkindler-autodev

Copy link
Copy Markdown

Resolves #340

This implements the multi-slug API proposed by @JedWatson in the issue, keeping collection paths static and deterministic — no callbacks — so the on-disk location of every entry is always known from the config and collections keep working over the GitHub API.

API

Björn Kindler and others added 2 commits October 8, 2026 19:17
…d listing depth

- thread the inferred slugFields tuple through Collection, Entry and
  CollectionReader so secondary slug fields read as their
  ReaderValueAsSlugField instead of ValueForReading
- reject paths with static segments between or after the wildcard
  segments when multiple slugFields are used, since slug composition
  only supports a static prefix followed by the wildcard segments
- stop the collection listing walker at the slug segment depth for
  fixed-depth paths instead of traversing every descendant
@changeset-bot

changeset-bot Bot commented Oct 8, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f80e9a0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@keystatic/core Minor
@keystatic/templates-astro Patch
@keystatic/templates-nextjs Patch
@keystatic/templates-remix Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

Enhancement: more configurable collection path

2 participants