Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 1.23 KB

README.md

File metadata and controls

32 lines (22 loc) · 1.23 KB

Matter

Continuous Integration Security Audit Crates.io Downloads Badge License Made by Fader

A universal frontmatter parser and extractor, written in Rust. Supports common delimiters for YAML, TOML, and JSON.

Installation

matter = { version = "0.1.0-alpha4" }

Usage

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.

License

Copyright 2018 Nicholas Young, All rights reserved. Released under a 3-Clause BSD License.