top | item 45872534

(no title)

f2hex | 3 months ago

I would be interested to know why the radical change to move the configuration file from YAML to TOML. Is there any good reason for that change?

discuss

order

squidfunk|3 months ago

Zensical team here. Yes, there are very good reasons for that change. First and foremost, with MkDocs using YAML, and Material for MkDocs being the main entrypoint for many of our users, we got a lot of issues with users having trouble just getting the indentation of YAML right. Secondly, and this is even more problematic: Python Markdown allows the use of custom YAML tags[1], which translate to function references during parsing. This means that YAML parsing is tied to Python and thus not portable to other languages. It's also the reason why we currently need to go through Python to parse MkDocs configuration and render Markdown. TOML on the other hand doesn't have such magic, making it portable.

[1]: https://pyyaml.org/wiki/PyYAMLDocumentation#yaml-tags-and-py...

f2hex|3 months ago

Thank you for your prompt response. Your explanation clarifies things much better than the brief description in the documentation. While I still prefer YAML over TOML, I understand your reasoning.