mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-22 13:29:01 +08:00
markdown: report errors during initial sitegen
This commit is contained in:
parent
0ac8bf58ea
commit
e63b83c8c4
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user