Documentation
¶
Overview ¶
Package frontmatter provides utilities for parsing YAML frontmatter from markdown files.
Index ¶
Constants ¶
View Source
const MaxFrontmatterLines = 100
MaxFrontmatterLines limits how far we search for frontmatter closing delimiter to prevent frontmatter bomb attacks (malicious files with unclosed frontmatter)
Variables ¶
This section is empty.
Functions ¶
func Split ¶
Split separates YAML frontmatter from markdown content Returns frontmatter bytes, content bytes, and any error
The function expects frontmatter to be delimited by "---" lines:
--- key: value --- Content here...
If no frontmatter is present, returns nil frontmatter and all data as content. If frontmatter is not closed within MaxFrontmatterLines, returns an error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.