diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-08-11 00:57:10 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-09-06 18:32:20 +0300 |
commit | 4fbce787406aafe23d86ec4c5854165d409e26c2 (patch) | |
tree | f2652b15d99d2e83daea2a55eedc8c01b5170675 /hugolib | |
parent | d8a256c155d23ad451625fcb292b297d85888c4c (diff) |
Add JSON config to the multilanguage testing
Updates #2309
Diffstat (limited to 'hugolib')
-rw-r--r-- | hugolib/hugo_sites_test.go | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/hugolib/hugo_sites_test.go b/hugolib/hugo_sites_test.go index c5a226dc2..50ee1ee72 100644 --- a/hugolib/hugo_sites_test.go +++ b/hugolib/hugo_sites_test.go @@ -168,6 +168,7 @@ func TestMultiSitesBuild(t *testing.T) { }{ {multiSiteTomlConfig, "toml"}, {multiSiteYAMLConfig, "yml"}, + {multiSiteJSONConfig, "json"}, } { doTestMultiSitesBuild(t, config.content, config.suffix) } @@ -654,6 +655,57 @@ Languages: ` +var multiSiteJSONConfig = ` +{ + "DefaultExtension": "html", + "baseurl": "http://example.com/blog", + "DisableSitemap": false, + "DisableRSS": false, + "RSSUri": "index.xml", + "paginate": 1, + "DefaultContentLanguage": "fr", + "permalinks": { + "other": "/somewhere/else/:filename" + }, + "blackfriday": { + "angledQuotes": true + }, + "Taxonomies": { + "tag": "tags" + }, + "Languages": { + "en": { + "weight": 10, + "title": "English", + "blackfriday": { + "angledQuotes": false + } + }, + "fr": { + "weight": 20, + "title": "Français", + "Taxonomies": { + "plaque": "plaques" + } + }, + "nn": { + "weight": 30, + "title": "Nynorsk", + "Taxonomies": { + "lag": "lag" + } + }, + "nb": { + "weight": 40, + "title": "Bokmål", + "Taxonomies": { + "lag": "lag" + } + } + } +} +` + func createMultiTestSites(t *testing.T, tomlConfig string) *HugoSites { return createMultiTestSitesForConfig(t, tomlConfig, "toml") } |