From a7bc6ab3db36532e1827610a8ffcb081794ef82b Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Thu, 16 Mar 2023 10:29:45 -0700 Subject: [PATCH] default tags --- walk.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/walk.go b/walk.go index d6a472e..34e3795 100644 --- a/walk.go +++ b/walk.go @@ -69,6 +69,11 @@ func walk(root, ext string, index bool, ignorePaths map[string]struct{}) (res [] title = strings.TrimSuffix(filepath.Base(fileName), filepath.Ext(fileName)) } + // default tags + if matter.Tags == nil { + matter.Tags = []string{} + } + // add to content and link index i[source] = Content{ LastModified: info.ModTime(),