diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-03-18 11:07:24 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-03-21 09:22:19 +0100 |
commit | e9c7b6205f94a7edac0e0df2cd18d1456cb26a06 (patch) | |
tree | 7c71d49c556f22497c3e0072ac25a3375f690074 /hugolib/case_insensitive_test.go | |
parent | 3d1a6e109ce9b25fc2e9731098a82fb4c0abff68 (diff) |
Allow themes to define output formats, media types and params
This allows a `config.toml` (or `yaml`, ´yml`, or `json`) in the theme to set:
1) `params` (but cannot override params in project. Will also get its own "namespace", i.e. `{{ .Site.Params.mytheme.my_param }}` will be the same as `{{ .Site.Params.my_param }}` providing that the main project does not define a param with that key.
2) `menu` -- but cannot redefine/add menus in the project. Must create its own menus with its own identifiers.
3) `languages` -- only `params` and `menu`. Same rules as above.
4) **new** `outputFormats`
5) **new** `mediaTypes`
This should help with the "theme portability" issue and people having to copy and paste lots of setting into their projects.
Fixes #4490
Diffstat (limited to 'hugolib/case_insensitive_test.go')
-rw-r--r-- | hugolib/case_insensitive_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hugolib/case_insensitive_test.go b/hugolib/case_insensitive_test.go index 680a701aa..52ef198a5 100644 --- a/hugolib/case_insensitive_test.go +++ b/hugolib/case_insensitive_test.go @@ -149,7 +149,7 @@ func TestCaseInsensitiveConfigurationVariations(t *testing.T) { caseMixingTestsWriteCommonSources(t, mm) - cfg, err := LoadConfig(ConfigSourceDescriptor{Fs: mm}) + cfg, _, err := LoadConfig(ConfigSourceDescriptor{Fs: mm, Filename: "config.toml"}) require.NoError(t, err) fs := hugofs.NewFrom(mm, cfg) |