Empty Content field
The emptyContent
is a mechanism to trigger a collection or singleton to output .mdoc
/.mdx
/.md
files even if there is no real markdoc
or mdx
field in the schema.
Use this in conjunction with the format.contentField
option.
Usage example
schema: {
emptyContent: fields.emptyContent({ extension: 'mdoc' })
},
format: {
contentField: 'emptyContent'
}
Instead of generating .yaml
or .json
files, the collection or singleton will output .mdoc
/.mdx
/.md
files with frontmatter data and an empty content body.