diff --git a/pkg/mark2web/context.go b/pkg/mark2web/context.go index a795dd1..4a12deb 100644 --- a/pkg/mark2web/context.go +++ b/pkg/mark2web/context.go @@ -112,11 +112,6 @@ func (node *TreeNode) addSubNode(tplFilename, subDir string, navname string, ctx newNode.root = node.root newPathConfig := new(PathConfig) - if navname != "" { - newPathConfig.This = ThisPathConfig{ - Navname: &navname, - } - } if dataMapKey != "" { if newPathConfig.Data == nil { newPathConfig.Data = make(helper.MapString) @@ -147,6 +142,10 @@ func (node *TreeNode) addSubNode(tplFilename, subDir string, navname string, ctx subDir, mergedConfig, ) + if navname != "" { + // set after fillConfig, because it is ignored in fillConfig + newNode.Config.This.Navname = &navname + } // fake via normal file behavior newNode.Config.Template = &tplFilename