commit ff2b98c9dd23d0b0bcc6d0a961f373911eee6bef
parent f34ea6108d259caec04b4f7b325c91db071e78f8
Author: spf13 <steve.francia@gmail.com>
Date: Sun, 29 Sep 2013 02:07:05 -0400
Better error message when no source content is found.
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/hugolib/site.go b/hugolib/site.go
@@ -247,6 +247,12 @@ func (s *Site) ProcessShortcodes() {
}
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 {