Support TOML as a frontmatter language

Use case or problem

YAML is supported as frontmatter and one of the reasons is for static site generators. Zola, the static site generator, does supports yaml for frontmatter but it actuallly considers TOML the default frontmatter language.

As most developers know not all YAML parsers are created equal in the various tool sets and languages out there. Performing any kind of automatic text parsing to read the YAML could have different outputs depending on the language and toolset used.

My opinion is that TOML’s layout and structure, make it a more natural fit for describing a document and it’s metadata. It also can be easier to write as it doesn’t require as much attention to indentations than YAML.

Proposed solution

Add additional frontmatter language support for TOML.

5 Likes

I was thinking about using obsidian to store content that i could share via the IOS app working copy to eventuall post to my Hugo site. Hugo uses TOML by default for the content files. I was also hoping to get some support for this as well for templates, right now it doesnt style it right. But it would also be good if obsidian could read it because IMHO TOML is better when you have lots of properties.

2 Likes

TOML as a frontmatter langiage would be great to have; IMHO TOML is much less error-prone especially when it comes to writing lists and other elements.
A possibility to differentiate between TOML and YAML frontmatter would be to use +++ as separators instead of ---. This is e.g. as it is handled in hugo.