hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 8b95cab94ce3426681f32c6f07620a3c7d2f572a
parent dd9344816a57586234e26554e06af331f16c0919
Author: bep <bjorn.erik.pedersen@gmail.com>
Date:   Sun,  1 Feb 2015 22:29:46 +0100

Avoid panic on unknown markup

Fixes #863

Diffstat:
Mhugolib/handler_meta.go | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/hugolib/handler_meta.go b/hugolib/handler_meta.go
@@ -16,6 +16,7 @@ package hugolib
 import (
 	"errors"
 
+	"fmt"
 	"github.com/spf13/hugo/source"
 )
 
@@ -66,6 +67,12 @@ func (mh *MetaHandle) Convert(i interface{}, s *Site, results HandleResults) {
 			results <- HandledResult{err: errors.New("file resulted in a nil page")}
 			return
 		}
+
+		if h == nil {
+			results <- HandledResult{err: fmt.Errorf("No handler found for page '%s'. Verify the markup is supported by Hugo.", p.FullFilePath())}
+			return
+		}
+
 		results <- h.PageConvert(p, s.Tmpl)
 		p.setSummary()
 		p.analyzePage()