Hugo: consistency: hugo new site uses config.toml, but YAML for content

Created on 21 Sep 2018  路  3Comments  路  Source: gohugoio/hugo

hugo new site test

config.toml uses TOML format:

title = "My New Hugo Site"

but archetypes/default.md uses YAML

title: "{{ replace .Name "-" " " | title }}"
---

Please change the default to TOML equivalent, to be consistent. Or, make them both YAML.

Most helpful comment

Not sure if you read it by the end.
Please avoid confusion for new users and make them both YAML, in this case.
One should be able to copy

title = "My New Hugo Site"

from one place to another and have it working.

All 3 comments

The reason is GitHub's support for YAML front matter. If they would support TOML front matter, we would change. But they don't.

Not sure if you read it by the end.
Please avoid confusion for new users and make them both YAML, in this case.
One should be able to copy

title = "My New Hugo Site"

from one place to another and have it working.

@mariusa actually has a point. If we can't move to TOML in a very large part of the contents for sites, then it would be more consistent to keep YAML for the config as well. Why not do that?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

antifuchs picture antifuchs  路  3Comments

vielmetti picture vielmetti  路  3Comments

kaushalmodi picture kaushalmodi  路  3Comments

bep picture bep  路  3Comments

crash-dive picture crash-dive  路  3Comments