3
0

Doc codegen tweaks & cleanup

This commit is contained in:
Tomaž Jerman
2020-12-05 10:30:10 +01:00
parent 01cfbf92a8
commit 402289016d
11 changed files with 56 additions and 49 deletions

View File

@@ -14,7 +14,7 @@ import (
func Proc() {
const (
docPathOptions = "/dev-ops-guide/server-configuration"
docGenBase = "/partials/generated"
)
var (
@@ -117,7 +117,7 @@ func Proc() {
}()
if len(docPath) > 0 {
docPath = strings.TrimRight(docPath, "/") + "/src/modules/ROOT/pages"
docPath = strings.TrimRight(docPath, "/") + "/src/modules/ROOT"
if i, err := os.Stat(docPath); err != nil {
handleError(err)
} else if !i.IsDir() {
@@ -193,7 +193,7 @@ func Proc() {
err = genEvents(tpls, eventDefs...)
}
if genDocs && err == nil {
err = genEventsDocs(tpls, docPath+docPathOptions, eventDefs...)
err = genEventsDocs(tpls, docPath+docGenBase, eventDefs...)
}
}
@@ -237,7 +237,7 @@ func Proc() {
}
if genDocs && err == nil {
err = genOptionsDocs(tpls, docPath+docPathOptions, optionDefs...)
err = genOptionsDocs(tpls, docPath+docGenBase, optionDefs...)
}
}