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

11
pkg/mark2web/run.go Normal file
View File

@@ -0,0 +1,11 @@
package mark2web
func Run(inDir, outDir string, defaultPathConfig *PathConfig) {
SetTemplateDir(inDir + "/templates")
tree := new(TreeNode)
tree.ReadContentDir(inDir+"/content", outDir, "", defaultPathConfig)
tree.ProcessContent()
ProcessAssets()
}

View File

@@ -16,5 +16,6 @@ type TreeNode struct {
Config *PathConfig
Sub []*TreeNode
root *TreeNode // shows always to root of tree
root *TreeNode // shows always to root of tree
parent *TreeNode
}