Better reporting when the template is missing.
authorNoah Campbell <noahcampbell@gmail.com>
Thu, 8 Aug 2013 00:34:17 +0000 (17:34 -0700)
committerNoah Campbell <noahcampbell@gmail.com>
Sat, 10 Aug 2013 00:36:32 +0000 (17:36 -0700)
hugolib/site.go

index 8ed61ae2ee0872dfce452eca3feae9dd9d7916dc..6991806248c68fe7f19d755680b5204744ddf838 100644 (file)
@@ -70,6 +70,11 @@ func (site *Site) Build() (err error) {
                return
        }
        if err = site.Render(); err != nil {
+               fmt.Printf("Error rendering site: %s\n", err)
+               fmt.Printf("Available templates:")
+               for _, template := range site.Tmpl.Templates() {
+                       fmt.Printf("\t%s\n", template.Name())
+               }
                return
        }
        site.Write()