From 4370d2292c937df66f910bb1abbbac6d6ef171af Mon Sep 17 00:00:00 2001 From: Phillip Markert Date: Mon, 14 Sep 2020 18:20:10 -0400 Subject: [PATCH] YAML front-matter delimiter support #91 (#92) --- internal/model/fs.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/model/fs.go b/internal/model/fs.go index cdf2693..32304c1 100644 --- a/internal/model/fs.go +++ b/internal/model/fs.go @@ -179,6 +179,9 @@ func loadMDMD(path string) metadataMarkdown { content := string(bytes) components := strings.Split(content, "---") + if components[0] == "" && (len(components) > 1) { + components = components[1:] + } if len(components) == 1 { panic(fmt.Sprintf("Malformed metadata markdown in %s, must be of the form: YAML\\n---\\nmarkdown content", path)) }