Misc config loading fixes
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 9 Jun 2021 08:58:18 +0000 (10:58 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 14 Jun 2021 15:00:32 +0000 (17:00 +0200)
commitd392893cd73dc00c927f342778f6dca9628d328e
treee2ea3eec09f36b7122ecdbc498c3c130e240e85c
parenta886dd53b80322e1edf924f2ede4d4ea037c5baf
Misc config loading fixes

The main motivation behind this is simplicity and correctnes, but the new small config library is also faster:

```
BenchmarkDefaultConfigProvider/Viper-16            252418       4546 ns/op     2720 B/op       30 allocs/op
BenchmarkDefaultConfigProvider/Custom-16           450756       2651 ns/op     1008 B/op        6 allocs/op
```

Fixes #8633
Fixes #8618
Fixes #8630
Updates #8591
Closes #6680
Closes #5192
107 files changed:
cache/filecache/filecache_config.go
cache/filecache/filecache_config_test.go
commands/commandeer.go
commands/commands_test.go
commands/config.go
commands/new_site.go
commands/server_test.go
common/maps/maps.go
common/maps/maps_test.go
common/maps/params.go
common/maps/params_test.go
config/commonConfig_test.go
config/compositeConfig.go [new file with mode: 0644]
config/compositeConfig_test.go [new file with mode: 0644]
config/configLoader.go
config/configProvider.go
config/configProvider_test.go
config/defaultConfigProvider.go [new file with mode: 0644]
config/defaultConfigProvider_test.go [new file with mode: 0644]
config/docshelper.go [new file with mode: 0644]
config/privacy/privacyConfig_test.go
config/services/servicesConfig_test.go
create/content_test.go
deploy/deployConfig_test.go
docs/config.toml
docs/content/en/getting-started/configuration.md
docs/data/docs.json
docs/layouts/shortcodes/code-toggle.html
go.mod
go.sum
helpers/content_test.go
helpers/general_test.go
helpers/path_test.go
helpers/testhelpers_test.go
hugofs/fs_test.go
hugofs/rootmapping_fs_test.go
hugolib/config.go
hugolib/config_test.go
hugolib/filesystems/basefs_test.go
hugolib/hugo_modules_test.go
hugolib/hugo_sites.go
hugolib/hugo_sites_build_errors_test.go
hugolib/image_test.go
hugolib/js_test.go
hugolib/minify_publisher_test.go
hugolib/page__meta.go
hugolib/page_test.go
hugolib/pagebundler_test.go
hugolib/pages_capture.go
hugolib/paths/paths_test.go
hugolib/resource_chain_babel_test.go
hugolib/resource_chain_test.go
hugolib/robotstxt_test.go
hugolib/shortcode_test.go
hugolib/site.go
hugolib/site_output_test.go
hugolib/site_test.go
hugolib/template_test.go
hugolib/testhelpers_test.go
langs/config.go
langs/i18n/i18n_test.go
langs/language.go
langs/language_test.go
markup/asciidocext/convert_test.go
markup/blackfriday/convert_test.go
markup/highlight/config_test.go
markup/markup_config/config.go
markup/markup_config/config_test.go
markup/markup_test.go
markup/mmark/convert_test.go
markup/org/convert_test.go
media/mediaType.go
minifiers/config.go
minifiers/config_test.go
minifiers/minifiers_test.go
modules/collect.go
modules/npm/package_builder.go
output/outputFormat.go
publisher/htmlElementsCollector_test.go
related/inverted_index.go
resources/page/pagemeta/page_frontmatter_test.go
resources/page/pagination_test.go
resources/page/testhelpers_test.go
resources/resource_metadata.go
resources/resource_transformers/htesting/testhelpers.go
resources/resource_transformers/js/options.go
resources/testhelpers_test.go
source/filesystem_test.go
tpl/cast/docshelper.go
tpl/collections/collections_test.go
tpl/data/init_test.go
tpl/data/resources_test.go
tpl/encoding/encoding.go
tpl/hugo/init_test.go
tpl/images/images_test.go
tpl/os/os_test.go
tpl/path/path_test.go
tpl/resources/resources.go
tpl/site/init_test.go
tpl/strings/init_test.go
tpl/strings/strings_test.go
tpl/tplimpl/template_funcs_test.go
tpl/transform/remarshal_test.go
tpl/transform/transform_test.go
tpl/transform/unmarshal_test.go
tpl/urls/init_test.go
tpl/urls/urls_test.go