Skip to main content

split_frontmatter

Function split_frontmatter 

Source
pub fn split_frontmatter(content: &str) -> (Option<String>, &str)
Expand description

Split content into frontmatter and body.

If the content starts with ---, extracts the YAML frontmatter between the first and second --- delimiters, and returns the body after. Otherwise returns None for frontmatter and the entire content as body.