diff options
-rw-r--r-- | hugolib/page.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hugolib/page.go b/hugolib/page.go index d4aca37a4..cf0a2144c 100644 --- a/hugolib/page.go +++ b/hugolib/page.go @@ -1318,10 +1318,11 @@ func (p *Page) parse(reader io.Reader) error { p.lang = p.Source.File.Lang() meta, err := psr.Metadata() + if err != nil { + return fmt.Errorf("failed to parse page metadata for %q: %s", p.File.Path(), err) + } + if meta != nil { - if err != nil { - return fmt.Errorf("failed to parse page metadata for %s: %s", p.File.Path(), err) - } if err = p.update(meta); err != nil { return err } |