1 unstable release

0.1.0 Jan 6, 2023

#29 in #front-matter

Download history 2/week @ 2024-02-20 10/week @ 2024-02-27 1/week @ 2024-03-05 5/week @ 2024-03-12 1/week @ 2024-03-26 17/week @ 2024-04-02 58/week @ 2024-04-09

76 downloads per month

MIT/Apache

7KB

toml-frontmatter

TOML frontmatter parser.

API

For documentation see docs.rs.

Example

#[derive(serde::Deserialize)]
struct Frontmatter {
  date: String,
}

let sample = r#"
---toml
date = "2023-01-01"
---

Some **Markdown**. Or something else!
"#.trim();

let (frontmatter, markdown) = toml_frontmatter::parse::<Frontmatter>(sample).unwrap();

License

Distributed under the Apache License 2.0 and MIT licenses, see LICENSE-Apache and LICENSE-MIT for more information.


lib.rs:

toml-frontmatter

TOML frontmatter parser.

See the parse documentation for an example.

License

Distributed under the Apache License 2.0 and MIT licenses, see LICENSE-Apache and LICENSE-MIT for more information.

Dependencies

~0.6–1.3MB
~29K SLoC