mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-07 06:26:18 +00:00
parent
28031b0897
commit
32fb1e6fac
1 changed files with 4 additions and 4 deletions
|
@ -579,16 +579,16 @@ func (p *Page) layouts(l ...string) []string {
|
||||||
|
|
||||||
switch p.Kind {
|
switch p.Kind {
|
||||||
case KindHome:
|
case KindHome:
|
||||||
return []string{"index.html", "_default/list.html"}
|
return p.site.appendThemeTemplates([]string{"index.html", "_default/list.html"})
|
||||||
case KindSection:
|
case KindSection:
|
||||||
section := p.sections[0]
|
section := p.sections[0]
|
||||||
return []string{"section/" + section + ".html", "_default/section.html", "_default/list.html", "indexes/" + section + ".html", "_default/indexes.html"}
|
return p.site.appendThemeTemplates([]string{"section/" + section + ".html", "_default/section.html", "_default/list.html", "indexes/" + section + ".html", "_default/indexes.html"})
|
||||||
case KindTaxonomy:
|
case KindTaxonomy:
|
||||||
singular := p.site.taxonomiesPluralSingular[p.sections[0]]
|
singular := p.site.taxonomiesPluralSingular[p.sections[0]]
|
||||||
return []string{"taxonomy/" + singular + ".html", "indexes/" + singular + ".html", "_default/taxonomy.html", "_default/list.html"}
|
return p.site.appendThemeTemplates([]string{"taxonomy/" + singular + ".html", "indexes/" + singular + ".html", "_default/taxonomy.html", "_default/list.html"})
|
||||||
case KindTaxonomyTerm:
|
case KindTaxonomyTerm:
|
||||||
singular := p.site.taxonomiesPluralSingular[p.sections[0]]
|
singular := p.site.taxonomiesPluralSingular[p.sections[0]]
|
||||||
return []string{"taxonomy/" + singular + ".terms.html", "_default/terms.html", "indexes/indexes.html"}
|
return p.site.appendThemeTemplates([]string{"taxonomy/" + singular + ".terms.html", "_default/terms.html", "indexes/indexes.html"})
|
||||||
}
|
}
|
||||||
|
|
||||||
// Regular Page handled below
|
// Regular Page handled below
|
||||||
|
|
Loading…
Add table
Reference in a new issue