default tags

This commit is contained in:
Jacky Zhao 2023-03-16 10:29:45 -07:00
parent 1661db2ac3
commit a7bc6ab3db

View File

@ -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(),