diff --git a/main.go b/main.go index 099cec6..846c5bb 100644 --- a/main.go +++ b/main.go @@ -257,6 +257,18 @@ type navElement struct { func buildNavigation(conf *PathConfigTree, curNavMap *map[string]*navElement, curNavSlice *[]*navElement, activeNav string) { for _, el := range conf.Sub { + ignNav := el.Config.Path.IgnoreForNav + if ignNav != nil && *ignNav != "" { + regex, err := regexp.Compile(*ignNav) + if err != nil { + log.Panicf("could not compile IngoreForNav regexp '%s' in '%s': %s", *ignNav, el.InputPath, err) + } + if regex.MatchString(path.Base(el.InputPath)) { + log.Noticef("ignoring input directory '%s' in navigation", el.InputPath) + continue + } + } + elPath := strings.TrimPrefix(el.OutputPath, *outDir+"/") subMap := make(map[string]*navElement)