From 8e849014654a4d1c6d78a9aa69e1c64df2e043df Mon Sep 17 00:00:00 2001 From: Sebastian Frank Date: Thu, 28 Feb 2019 18:41:22 +0100 Subject: [PATCH] fixed run, if templates/filters is missing --- main.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 92da561..0b1c962 100644 --- a/main.go +++ b/main.go @@ -120,9 +120,12 @@ func main() { //spew.Dump(navMap) - templateDir := *inDir + "/templates" - helper.SetTemplateDir(templateDir) - helper.RegisterFilters(templateDir + "/filters") + templatesDir := *inDir + "/templates" + helper.SetTemplateDir(templatesDir) + filtersDir := templatesDir + "/filters" + if _, err := os.Stat(filtersDir); !os.IsNotExist(err) { + helper.RegisterFilters(filtersDir) + } helper.ProcessContent(contentConfig, contentConfig) helper.ProcessAssets()