mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-13 17:40:38 -04:00
Add some more single page layout variants
This commit is contained in:
parent
d5e7c03e20
commit
201cf4f67e
@ -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`.
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user