diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-07-02 10:46:28 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-07-04 09:12:44 +0200 |
commit | aa6b1b9be7c9d7322333893b642aaf8c7a5f2c2e (patch) | |
tree | 14e3995039a65d7f8e98ff47c6c738b3a7e1684b /output/layout_test.go | |
parent | a1d260b41a6673adef679ec4e262c5f390432cf5 (diff) |
output: Support templates per site/language
This applies to both regular templates and shortcodes. So, if the site language is French and the output format is AMP, this is the (start) of the lookup order for the home page:
1. index.fr.amp.html
2. index.amp.html
3. index.fr.html
4. index.html
5. ...
Fixes #3360
Diffstat (limited to 'output/layout_test.go')
-rw-r--r-- | output/layout_test.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/output/layout_test.go b/output/layout_test.go index 9d4d2f6d5..6fb958c9d 100644 --- a/output/layout_test.go +++ b/output/layout_test.go @@ -59,6 +59,8 @@ func TestLayout(t *testing.T) { }{ {"Home", LayoutDescriptor{Kind: "home"}, true, "", ampType, []string{"index.amp.html", "index.html", "_default/list.amp.html", "_default/list.html", "theme/index.amp.html", "theme/index.html"}}, + {"Home, french language", LayoutDescriptor{Kind: "home", Lang: "fr"}, true, "", ampType, + []string{"index.fr.amp.html", "index.amp.html", "index.fr.html", "index.html", "_default/list.fr.amp.html", "_default/list.amp.html", "_default/list.fr.html", "_default/list.html", "theme/index.fr.amp.html", "theme/index.amp.html", "theme/index.fr.html"}}, {"Home, no ext or delim", LayoutDescriptor{Kind: "home"}, true, "", noExtDelimFormat, []string{"index.nem", "_default/list.nem"}}, {"Home, no ext", LayoutDescriptor{Kind: "home"}, true, "", noExt, |