Make hugo.toml the new config.toml
bep opened this issue · 4 comments
So, the naming of Hugo's default config file config.toml
(and json ...) was a mistake. The reasoning:
- It's very generic, so there are potential naming conflicts in multi-framework setups
- It's very generic, so it cannot be used for discoverability (that is a Hugo project)
I have looked at this before and just brushed it off with a "there are too many projects out there", but I now think we should just do it:
- So,
config.toml
will still be a fall back, but we first tryhugo.toml
. - We may, some time in the future, add some warnings to the
config.toml
case, but that is not in scope for now. - I also suggest, as part of this, that we make having a
hugo.toml
(or JSON ...) eventually be a requirement for any Hugo project (even if it's empty).
If ROOT/config.EXTENSION
is replaced with ROOT/hugo.EXTENSION
, I wonder if any of the following should be changed for consistency:
- Should
configDir
be renamedhugoDir
? - Should
ROOT/config/_default/hugo.EXTENSION
be renamedROOT/hugo/_default/hugo.EXTENSION
? - Should
--config
switch be renamed--hugo
switch?
I don't have an opinion about this, but it's something to think about.
Thanks for all your great work bep and others!
@nancym, it's still the hugo config. The goal is to make the file name less ambiguous in the context of a generic filesystem. The --config
option is scoped to the hugo command, so there's no real ambiguity there.
The ROOT/config/
directory name has a similar ambiguity, so that's something to consider. Even if that's changed, I'm not sure configDir
needs to change, so it's scoped to the hugo config.
@moorereason is right. My primary motivation behind this is to get to a state where _every Hugo project has a hugo.* file). So, if you have a config
dir, we will probably also enforce a (empty?) hugo.* file. There will be situations where people would want to name them differently (having multiple configs), so the options for configDir
etc. still make sense.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.