From aa6b1b9be7c9d7322333893b642aaf8c7a5f2c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sun, 2 Jul 2017 10:46:28 +0200 Subject: 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 --- output/layout_test.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'output/layout_test.go') 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, -- cgit v1.2.3