Better reporting when the template is missing.

This commit is contained in:
Noah Campbell 2013-08-07 17:34:17 -07:00
parent 309db474c7
commit 2bbecc7bc8

View 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()