Markdown
The MD
class contains several helpers to work with Markdown and frontmatter text.
The parser also support markdown variants like MDX.
frontmatter
Extracts and parses the frontmatter text from a markdown file. Returns undefined
if no frontmatter is not found or the parsing failed. Default format is yaml
.
content
Extracts the markdown source without the frontmatter.
updateFrontmatter
Merges frontmatter values into the existing in a markdown file. Use null
value to delete fields.