toml-frontmatter

Crates.iotoml-frontmatter
lib.rstoml-frontmatter
version0.1.0
sourcesrc
created_at2023-01-06 13:06:36.348506
updated_at2023-01-06 13:06:36.348506
descriptionTOML frontmatter parser.
homepage
repositoryhttps://git.bauke.xyz/Holllo/toml-frontmatter
max_upload_size
id752291
size18,448
Bauke (Bauke)

documentation

README

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.

Commit count: 0

cargo fmt