mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Adding support for a default content type template
default template found at layouts/_default/single.html
This commit is contained in:
parent
8968524900
commit
ec02fa4bdd
1 changed files with 5 additions and 1 deletions
|
@ -348,7 +348,11 @@ func (s *Site) RenderPages() error {
|
||||||
for i, _ := range s.Pages {
|
for i, _ := range s.Pages {
|
||||||
content, err := s.RenderThing(s.Pages[i], s.Pages[i].Layout())
|
content, err := s.RenderThing(s.Pages[i], s.Pages[i].Layout())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
var err2 error
|
||||||
|
content, err2 = s.RenderThing(s.Pages[i], "_default/single.html")
|
||||||
|
if err2 != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
s.Pages[i].RenderedContent = content
|
s.Pages[i].RenderedContent = content
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue