fixed run, if templates/filters is missing
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Sebastian Frank 2019-02-28 18:41:22 +01:00
parent 079534ab71
commit 8e84901465
Signed by: apairon
GPG Key ID: 7270D06DDA7FE8C3

View File

@ -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()