-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Currently, the ContentEditorCode component does not handle data collection items. Selecting a data collection file makes the editor appear, but does not display any code.
Content schema:
docs: defineCollection({
type: 'page',
source: {
include: '**',
exclude: ['data/**'],
},
schema: createDocsSchema(),
}),
data: defineCollection({
type: 'data',
source: {
include: 'data/**',
},
schema: z.object({
title: z.string(),
}),
}),
I think the issue is two fold. For one any DatabasePageItem that does not have a body does not call setContent at all. See the code.
Changing that check to pass brings a second issue to light, where generateContentFromDocument does not handle custom document schemas properly.
Drew-Macgibbon, larsrickert and sebworks2024
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working