Fix single template not being sourced

This commit is contained in:
Timur Demin 2020-11-19 04:30:37 +05:00
parent 6859f3d57c
commit 0a62f8142c
No known key found for this signature in database
GPG key ID: 9EDF3F9D9286FA20

View file

@ -229,9 +229,14 @@ func main() {
}
}
var singleTemplate = defaultSingleTemplate
if tmpl, hasTmpl := templates["single"]; hasTmpl {
singleTemplate = tmpl
}
// render posts to files
for fileName, post := range posts {
var tmpl = defaultSingleTemplate
var tmpl = singleTemplate
if pl := post.Metadata.PostLayout; pl != "" {
t, ok := templates[pl]
if !ok {