Options
frontmatterGlobals
Specify static variables to be added to all frontmatter blocks.
Accepts a key/value object.
---
layout: docs
sidebar: true
---
{
"frontmatterGlobals": {
"layout": "docs",
"sidebar": true
}
}
readmeFrontmatter
Specify static variables to be added to the readme page only.
Accepts a key/value object.
{
"readmeFrontmatter": {
"onReadme": "true"
}
}
indexFrontmatter
Specify static variables to be added to the index page only.
Accepts a key/value object.
{
"indexFrontmatter": {
"onIndex": "true"
}
}
frontmatterCommentTags
Specify which comment block tags should be added to frontmatter.
Accepts an array of string values.
Frontmatter variables can be added by extracting comments from block (@) tags.
Please note tags must be added to the comment blocks of the symbol exported to a page.
/**
* @author Joe Bloggs
*
* @description A description that will be added to frontmatter.
*/
---
author: Joe Bloggs
description: A description that will be added to frontmatter.
---
{
"frontmatterCommentTags": ["author", "description"]
}
preserveFrontmatterCommentTags
Preserve tags defined in frontmatter block tags in output.
Accepts a boolean value. Defaults to
false
.
By default tags defined in frontmatterCommentTags
are removed from final output.
Use this option to preserve the tags in the output.
{
"preserveFrontmatterCommentTags": false
}
frontmatterNamingConvention
The naming convention that variables should be output as.
Accepts either
"camelCase"
or"snakeCase"
. Defaults to"camelCase"
.
Block tags have to be written in camelCase (see tsdoc.org).
This option can configure the output style of frontmatter variables when written to YAML.
{
"frontmatterNamingConvention": "camelCase"
}
yamlStringifyOptions
yaml.stringify()
.Accepts a key/value object.
Provides additional options to control how YAML is internally serialized using
the yaml.stringify
method from the YAML library.
For available options, see YAML ToString Options.
Please note that { lineWidth: 0 }
is set by default to prevent invalid wrapping.
{
"yamlStringifyOptions": {
"defaultStringType": "QUOTE_SINGLE",
"defaultKeyType": "PLAIN"
}
}