projects
/
brevno-suite
/
hugo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f34ea61
)
Better error message when no source content is found.
author
spf13
<steve.francia@gmail.com>
Sun, 29 Sep 2013 06:07:05 +0000
(
02:07
-0400)
committer
spf13
<steve.francia@gmail.com>
Sun, 29 Sep 2013 06:10:29 +0000
(
02:10
-0400)
hugolib/site.go
patch
|
blob
|
history
diff --git
a/hugolib/site.go
b/hugolib/site.go
index 2e16094b9fb88cb122feec765d88874501f1c9fe..58f770d5a2521e7d1069abb45ca269e58214e16a 100644
(file)
--- 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 {