ref: ff2b98c9dd23d0b0bcc6d0a961f373911eee6bef
parent: f34ea6108d259caec04b4f7b325c91db071e78f8
author: spf13 <[email protected]>
date: Sat Sep 28 22:07:05 EDT 2013
Better error message when no source content is found.
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -247,6 +247,12 @@
}
func (s *Site) CreatePages() (err error) {
+ if s.Source == nil {
+ return fmt.Errorf("No source files found in", s.absContentDir())
+ }
+ if len(s.Source.Files()) < 1 {
+ return fmt.Errorf("No source files found in", s.absContentDir())
+ }
for _, file := range s.Source.Files() {
page, err := ReadFrom(file.Contents, file.LogicalName)
if err != nil {