Add some more single page layout variants

This commit is contained in:
Bjørn Erik Pedersen 2018-01-19 11:39:14 +01:00
parent d5e7c03e20
commit 201cf4f67e
No known key found for this signature in database
GPG Key ID: 330E6E2BD4859D8F
2 changed files with 33 additions and 1 deletions

View File

@ -29,7 +29,7 @@ Kind
: The page `Kind` (the home page is one). See the example tables below per kind. This also determines if it is a **single page** (i.e. a regular content page. We then look for a template in `_default/single.html` for HTML) or a **list page** (section listings, home page, taxonomy lists, taxonomy terms. We then look for a template in `_default/list.html` for HTML).
Output Format
: See [Custom Output Formats](/templates/output-formats). An output format has both a `name` (e.g. 'rss', 'amp', 'html') and a `suffix` (e.g. `xml`, `html`). We prefer matches with both (e.g. `index.amp.html`, but look for less specific templates.
: See [Custom Output Formats](/templates/output-formats). An output format has both a `name` (e.g. `rss`, `amp`, `html`) and a `suffix` (e.g. `xml`, `html`). We prefer matches with both (e.g. `index.amp.html`, but look for less specific templates.
Language
: We will consider a language code in the template name. If the site language is `fr`, `index.fr.amp.html` will win over `index.amp.html`, but we will `index.amp.html` will be chosen before `index.fr.html`.

View File

@ -247,6 +247,22 @@
"layouts/_default/single.html"
]
},
{
"Example": "Single page in \"posts\" section with theme",
"Kind": "page",
"OutputFormat": "HTML",
"Suffix": "html",
"Template Lookup Order": [
"layouts/posts/single.html.html",
"demoTheme/layouts/posts/single.html.html",
"layouts/posts/single.html",
"demoTheme/layouts/posts/single.html",
"layouts/_default/single.html.html",
"demoTheme/layouts/_default/single.html.html",
"layouts/_default/single.html",
"demoTheme/layouts/_default/single.html"
]
},
{
"Example": "AMP single page",
"Kind": "page",
@ -259,6 +275,22 @@
"layouts/_default/single.html"
]
},
{
"Example": "AMP single page, French language",
"Kind": "page",
"OutputFormat": "AMP",
"Suffix": "html",
"Template Lookup Order": [
"layouts/posts/single.fr.amp.html",
"layouts/posts/single.amp.html",
"layouts/posts/single.fr.html",
"layouts/posts/single.html",
"layouts/_default/single.fr.amp.html",
"layouts/_default/single.amp.html",
"layouts/_default/single.fr.html",
"layouts/_default/single.html"
]
},
{
"Example": "Home page",
"Kind": "home",