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/docshelper.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/docshelper.go')
-rw-r--r-- | output/docshelper.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/output/docshelper.go b/output/docshelper.go index 1df45726c..c45e956e6 100644 --- a/output/docshelper.go +++ b/output/docshelper.go @@ -44,6 +44,7 @@ func createLayoutExamples() interface{} { f Format }{ {`AMP home, with theme "demoTheme".`, LayoutDescriptor{Kind: "home"}, true, "", AMPFormat}, + {`AMP home, French language".`, LayoutDescriptor{Kind: "home", Lang: "fr"}, false, "", AMPFormat}, {"JSON home, no theme.", LayoutDescriptor{Kind: "home"}, false, "", JSONFormat}, {fmt.Sprintf(`CSV regular, "layout: %s" in front matter.`, demoLayout), LayoutDescriptor{Kind: "page", Layout: demoLayout}, false, "", CSVFormat}, {fmt.Sprintf(`JSON regular, "type: %s" in front matter.`, demoType), LayoutDescriptor{Kind: "page", Type: demoType}, false, "", JSONFormat}, |