Improve error message on frontmatter parse error

This commit is contained in:
Adnan Maolood 2021-04-26 11:50:40 -04:00
parent 1b7f5b4ab4
commit f28ba9b9fd

View file

@ -52,7 +52,7 @@ func NewPage(path string, content []byte) *Page {
frontmatter, content = extractFrontmatter(content) frontmatter, content = extractFrontmatter(content)
if len(frontmatter) != 0 { if len(frontmatter) != 0 {
if err := yaml.Unmarshal(frontmatter, &page); err != nil { if err := yaml.Unmarshal(frontmatter, &page); err != nil {
log.Println(err) log.Printf("failed to parse frontmatter for %q: %v", path, err)
} }
} }