You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the only format for front matter appears to be YAML. It is possible to load config files in TOML format, but not front matter or even data files. A TOML parser is already part of Jekyll, so it seems best to use it to its full potential.
Motivation
I highly prefer the syntax of TOML, and would choose it over YAML in many cases. I recently got very frustrated with YAML's syntax, in particular the enforcement of spaces for indentation, which mixes poorly with the rest of my files; and despite how well Jekyll, its features, and the Liquid templating language work for me, I considered looking into a different SSG purely to escape YAML. Perhaps my reaction is intense, but I imagine I am not the only one who could find frustration in this.
Jekyll has supported config files in TOML format since 2013, however this has seemingly not been extended to any other aspect of the program. The parser has been there all this time, included with every installation of Jekyll, but it has not been able to be used to its true potential. There are potentially many Jekyll users who would have utilized TOML if it could be used consistently as an alternative to YAML, rather than a niche case for only the config file. I only learned it could be used for configs while thinking of making an issue about this.
Reference-level explanation
Other popular SSGs including Hugo and Zola implemented this with using +++ to surround the front matter instead, clearly distinguishing the usage of YAML and TOML. Besides the obvious benefits of sticking to convention, this would ensure implementing TOML support would have no backwards compatibility implications, and have no conflict with YAML parsing.
Drawbacks
It is another choice which would need to be presented in documentation.
The text was updated successfully, but these errors were encountered:
Summary
Currently, the only format for front matter appears to be YAML. It is possible to load config files in TOML format, but not front matter or even data files. A TOML parser is already part of Jekyll, so it seems best to use it to its full potential.
Motivation
I highly prefer the syntax of TOML, and would choose it over YAML in many cases. I recently got very frustrated with YAML's syntax, in particular the enforcement of spaces for indentation, which mixes poorly with the rest of my files; and despite how well Jekyll, its features, and the Liquid templating language work for me, I considered looking into a different SSG purely to escape YAML. Perhaps my reaction is intense, but I imagine I am not the only one who could find frustration in this.
Jekyll has supported config files in TOML format since 2013, however this has seemingly not been extended to any other aspect of the program. The parser has been there all this time, included with every installation of Jekyll, but it has not been able to be used to its true potential. There are potentially many Jekyll users who would have utilized TOML if it could be used consistently as an alternative to YAML, rather than a niche case for only the config file. I only learned it could be used for configs while thinking of making an issue about this.
Reference-level explanation
Other popular SSGs including Hugo and Zola implemented this with using
+++
to surround the front matter instead, clearly distinguishing the usage of YAML and TOML. Besides the obvious benefits of sticking to convention, this would ensure implementing TOML support would have no backwards compatibility implications, and have no conflict with YAML parsing.Drawbacks
It is another choice which would need to be presented in documentation.
The text was updated successfully, but these errors were encountered: