Richard Schneeman on Nostr: nprofile1q…cp3s2 I forget, is front matter a part of YAML or a separate thing? You ...
nprofile1qy2hwumn8ghj7un9d3shjtnddaehgu3wwp6kyqpqqtfvdrmuyd4xsllc5ktqnxhe556m2yl66pxkaktpmnk92frtlu7qtcp3s2 (nprofile…p3s2) I forget, is front matter a part of YAML or a separate thing?
You can try deserializing a document into a yaml Value and print debug it to see if it captured the info you’re looking for https://docs.rs/serde_yaml/latest/serde_yaml/enum.Value.html
Looks like there are a few frontmatter crates https://crates.io/search?q=frontmatter
Looks like this one just inspects the string https://docs.rs/frontmatter/0.4.0/src/frontmatter/lib.rs.html#9
The overkill “best” way to do it would be to write a parser with something like winnow, but IDK if the problem space calls for it.
You can try deserializing a document into a yaml Value and print debug it to see if it captured the info you’re looking for https://docs.rs/serde_yaml/latest/serde_yaml/enum.Value.html
Looks like there are a few frontmatter crates https://crates.io/search?q=frontmatter
Looks like this one just inspects the string https://docs.rs/frontmatter/0.4.0/src/frontmatter/lib.rs.html#9
The overkill “best” way to do it would be to write a parser with something like winnow, but IDK if the problem space calls for it.