-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make hugo.toml the new config.toml #10621
Conversation
Both will of course work, but hugo.toml will win if both are set. We should have done this a long time ago, of course, but the reason I'm picking this up now is that my VS Code setup by default picks up some JSON config schema from some random other software which also names its config files config.toml. Fixes gohugoio#8979
c5eb580
to
bd5d23f
Compare
|
||
` | ||
|
||
for _, configName := range []string{"hugo.toml", "config.toml"} { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmooring do you see any problems with this test case?
Note that
- For the main config file in the root, we will pick the first. For the config.toml inside /config, I have made it simple so you can in theory have both, but that should not be a problem...
- I will wait a little before changing the behaviour of hugo new site
Also note that the main motivation behind me doing this now is VS Code starting to pick some other random config schema and is throwing these validation errors for me when doing config edits. I'm able to change this inside VS Code, but it's rather annoying, and I suspect this will improve when having a distinct filename,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested various combinations of having both config.xxx
and hugo.xxx
in all 4 directories, making sure that the files in root or theme root are not merged, and files in the config root or theme config root are merged. Looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm updating my Hugo-related web pages, for example https://www.ii.com/hugo-data-directory/, and discovered that hugo new site
is still creating config.toml
rather than hugo.toml
. I know @bep is waiting a little to change this, but my vote is to change it ASAP because it makes it easier for those of us who want to document this new thing. Thanks!
Follow-up to gohugoio#10621. Remaining documentation changes will be addressed in the documentation repository after this is merged and released.
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Both will of course work, but hugo.toml will win if both are set.
We should have done this a long time ago, of course, but the reason I'm picking this up now is that my VS Code setup by default picks up some
JSON config schema from some random other software which also names its config files config.toml.
Fixes #8979