Commit e63b83c8 authored by Matthew Holt's avatar Matthew Holt

markdown: report errors during initial sitegen

parent 0ac8bf58
......@@ -48,7 +48,8 @@ func Markdown(c *Controller) (middleware.Middleware, error) {
}
fp := filepath.Join(md.Root, cfg.PathScope)
filepath.Walk(fp, func(path string, info os.FileInfo, err error) error {
err = filepath.Walk(fp, func(path string, info os.FileInfo, err error) error {
for _, ext := range cfg.Extensions {
if !info.IsDir() && strings.HasSuffix(info.Name(), ext) {
// Load the file
......@@ -75,9 +76,12 @@ func Markdown(c *Controller) (middleware.Middleware, error) {
break // don't try other file extensions
}
}
return nil
})
if err != nil {
return err
}
}
return nil
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment