Skip to content

Commit

Permalink
Fix single template not being sourced
Browse files Browse the repository at this point in the history
  • Loading branch information
tdemin committed Nov 18, 2020
1 parent 6859f3d commit 0a62f81
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/gmnhg/main.go
Expand Up @@ -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 {
Expand Down

0 comments on commit 0a62f81

Please sign in to comment.