Run function

This commit is contained in:
Sebastian Frank
2019-03-19 11:34:35 +01:00
parent 70d7497eda
commit 0dfe0f8142
3 changed files with 15 additions and 13 deletions

View File

@@ -22,8 +22,6 @@ var (
var log = helper.Log
var tree = new(mark2web.TreeNode)
func main() {
inDir := flag.String("in", "./", "input directory")
outDir := flag.String("out", "html", "output directory")
@@ -127,19 +125,11 @@ func main() {
Quality: 75,
}
tree.ReadContentDir(*inDir+"/content", *outDir, "", defaultPathConfig)
//spew.Dump(contentConfig)
//spew.Dump(navMap)
templatesDir := *inDir + "/templates"
mark2web.SetTemplateDir(templatesDir)
filtersDir := templatesDir + "/filters"
filtersDir := *inDir + "/templates/filters"
if _, err := os.Stat(filtersDir); !os.IsNotExist(err) {
filter.RegisterFilters(filtersDir)
}
tree.ProcessContent()
mark2web.ProcessAssets()
mark2web.Run(*inDir, *outDir, defaultPathConfig)
}