opened 08:06AM - 16 May 23 UTC
Enhancement
## Reconsolidated all configuration handling
For this release we have collect…ed all configuration into one big Go struct. Which makes the source code easier to maintain and understand, but the original motivation for this was to get a complete and autogenerated API reference for Hugo (we're working on getting that done), but this also has some less technical upsides:
### 'hugo config' is now complete
What you get when running `hugo config` is a complete JSON representation of _the effective_ configuration. As this will include default values, we don't recommend to copy and paste this into `hugo.json`, as that would make your configuration very verbose.
### Improved language config handling
See issue #10620 for some details, but in general, the merge behaviour of `params` sub sections in from the `languages` section. In the example below for language `en` you will now get:
```json
"comments": {
"color": "blue",
"title": "English Comments Title",
}
```
In earlier versions of Hugo you would get:
```json
"comments": {
"title": "English Comments Title",
}
```
```toml
title = "Base Title"
staticDir = "mystatic"
[params]
[params.comments]
color = "blue"
title = "Default Comments Title"
[languages]
[languages.en]
title = "English Title"
[languages.en.params.comments]
title = "English Comments Title"
```
Note that values in a given language will always have precedence over same keys in root (the section inside the language is the receiving side of any merge operation), so, if you want the old (and buggy) behaviour, you can add a merge strategy to one of the `params` sections, e.g:
```toml
[languages.en.params.comments]
_merge = "none"
title = "English Comments Title"
```
## More info in verbose build output
If you build flag with the `-v`, you will now get timing info for the core building steps in Hugo:
```
INFO 2023/05/16 09:53:55 process in 17 ms
INFO 2023/05/16 09:53:55 assemble in 345 ms
INFO 2023/05/16 09:53:55 render in 341 ms
INFO 2023/05/16 09:53:55 postProcess in 0 ms
```