fix toc wrong typing

This commit is contained in:
Timothy Lin 2024-09-12 21:59:17 +08:00
parent 142c14c6f3
commit 717fe4aee3

View File

@ -54,7 +54,7 @@ const computedFields: ComputedFields = {
type: 'string',
resolve: (doc) => doc._raw.sourceFilePath,
},
toc: { type: 'string', resolve: (doc) => extractTocHeadings(doc.body.raw) },
toc: { type: 'json', resolve: (doc) => extractTocHeadings(doc.body.raw) },
}
/**