okkur / syna

Highly customizable open source theme for Hugo based static websites
https://syna.okkur.org/demo/
Apache License 2.0
250 stars 134 forks source link

Converting to YAML? #764

Closed schoettl closed 4 years ago

schoettl commented 4 years ago

Is this a BUG REPORT or FEATURE REQUEST?: feature

What happened: config files and markdown front matter is all in toml.

hugo new content/test.md creates files with YAML front matter.

So YAML seems to be the default and I think it's the simpler and better format.

What are you, dear maintainers, thinking?

Would you accept a PR where we convert to YAML?

Environment:

stp-ip commented 4 years ago

For the user it is possible to just use YAML on their end. It should work with YAML, TOML and JSON. Changing the current examples for the sake of changing them feels like a subjective change, which doesn't warrant the effort.

What are you specifically trying to do?

schoettl commented 4 years ago

OK, I just wanted to provide help to improve the example.

I know, I can change the front matter with hugo convert.

But I did not find out yet, how to convert the config.toml to config.yaml. My work around was, to copy the config file contents into a front matter and then hugo convert.

stp-ip commented 4 years ago

No criticism on suggesting this or anything else in the future. Only that this is too subjective to change in my view and doing it once opens up the discussion to do it again to \<tool-of-the-future> again etc.

As you mentioned hugo convert does work for frontmatter for the config.toml you could use an online tool such as https://toolkit.site/format.html it is minimal, but usually works well for JSON <> TOML <> YAML.

Another reason to not switch to a new format is breaking existing users. Repulling and copying over a new config might break automation from various people relying on it being .toml.

stp-ip commented 4 years ago

Closing this for now, but open to discussing this with a specific use case or edge case in mind. We could help with better documentation on this, if the Hugo docs are not enough. Happy for suggestions on that front.

schoettl commented 4 years ago

Alright, thank you!