diff --git a/Dockerfile b/Dockerfile index 5ccf524..bf38d60 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,5 @@ # File generated by github.com/posener/goaction. DO NOT EDIT. - FROM golang:1.16-alpine3.14 RUN apk add git diff --git a/walk.go b/walk.go index 59e4dcb..d6a472e 100644 --- a/walk.go +++ b/walk.go @@ -14,8 +14,9 @@ import ( ) type Front struct { - Title string `yaml:"title"` - Draft bool `yaml:"draft"` + Title string `yaml:"title"` + Draft bool `yaml:"draft"` + Tags []string `yaml:"tags"` } // recursively walk directory and return all files with given extension @@ -52,6 +53,7 @@ func walk(root, ext string, index bool, ignorePaths map[string]struct{}) (res [] matter = Front{ Title: "Untitled Page", Draft: false, + Tags: []string{}, } body = text } @@ -72,6 +74,7 @@ func walk(root, ext string, index bool, ignorePaths map[string]struct{}) (res [] LastModified: info.ModTime(), Title: title, Content: body, + Tags: matter.Tags, } res = append(res, parse(s, root)...) } else {