keystatic
keystatic copied to clipboard
collection with `**` path cannot use more than one mdx field
this may just be a documentation issue, but using multiple mdx fields in a collection which allows nested paths does not work.
issue repro: https://github.com/stefanprobst/keystatic-mdx-nested
collection has:
posts: collection({
label: "Posts",
slugField: "title",
path: "./content/posts/**",
format: { contentField: "content" },
schema: {
title: fields.slug({ name: { label: "Title" } }),
summary: fields.mdx({
label: "Summary",
}),
content: fields.mdx({
label: "Content",
}),
},
}),
a collection entry will be saved as:
content/posts/my-first-post.mdx
content/posts/my-first-post/summary.mdx
however, reader.collections.posts.list() will return both "my-first-post" and "my-first-post/summary" as entries, and both are also listed in the keystatic ui: