From 0a62f8142cadc49764ccc790866ea5053c576ece Mon Sep 17 00:00:00 2001 From: Timur Demin Date: Thu, 19 Nov 2020 04:30:37 +0500 Subject: [PATCH] Fix single template not being sourced --- cmd/gmnhg/main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/gmnhg/main.go b/cmd/gmnhg/main.go index dede3d0..200f6a7 100644 --- a/cmd/gmnhg/main.go +++ b/cmd/gmnhg/main.go @@ -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 {