Markdown
The MD
class provides a set of utilities to work with Markdown and frontmatter text.
The parser also supports markdown variants like MDX.
frontmatter
Extracts and parses the frontmatter text from a markdown file. Returns undefined
if no frontmatter is found or if parsing fails. The default format is yaml
.
content
Extracts the markdown source without the frontmatter.
updateFrontmatter
Merges frontmatter values into the existing markdown file. Use null
value to delete fields.