mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Better error message when no source content is found.
This commit is contained in:
parent
f34ea6108d
commit
ff2b98c9dd
1 changed files with 6 additions and 0 deletions
|
@ -247,6 +247,12 @@ func (s *Site) ProcessShortcodes() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Site) CreatePages() (err error) {
|
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() {
|
for _, file := range s.Source.Files() {
|
||||||
page, err := ReadFrom(file.Contents, file.LogicalName)
|
page, err := ReadFrom(file.Contents, file.LogicalName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue