A universal frontmatter parser and extractor, written in Rust. Supports common delimiters for YAML, TOML, and JSON.
matter = { version = "0.1.0-alpha4" }
Once installed, you'll notice that Matter exports only a handful of functions. This is because it does most of the work for you. It also attempts to operate with minimal overhead, by only allocating as necessary.
let input = std::fs::read_to_string("./path/to/content.md").unwrap();
let (matter, content) = matter::matter(&input).unwrap();
See the docs for more examples.
Copyright 2018 Nicholas Young, All rights reserved. Released under a 3-Clause BSD License.