Adding support for a default content type template
authorspf13 <steve.francia@gmail.com>
Tue, 13 Aug 2013 13:23:43 +0000 (09:23 -0400)
committerspf13 <steve.francia@gmail.com>
Tue, 13 Aug 2013 13:23:43 +0000 (09:23 -0400)
default template found at layouts/_default/single.html

hugolib/site.go

index 2f925ef022e466ae03fb8ecd11e4b7067ea05699..b7353d7ff3fc30c1b06dcf073569bcfadd677e1a 100644 (file)
@@ -348,7 +348,11 @@ func (s *Site) RenderPages() error {
        for i, _ := range s.Pages {
                content, err := s.RenderThing(s.Pages[i], s.Pages[i].Layout())
                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
        }