Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
default tags
Browse files Browse the repository at this point in the history
  • Loading branch information
jackyzha0 committed Mar 16, 2023
1 parent 1661db2 commit a7bc6ab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions walk.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit a7bc6ab

Please sign in to comment.