diff --git a/docs/user_docs/cli/_category_.yml b/docs/user_docs/cli/_category_.yml deleted file mode 100644 index dff53aca8..000000000 --- a/docs/user_docs/cli/_category_.yml +++ /dev/null @@ -1,5 +0,0 @@ -position: 30 -label: Command Line -collapsible: true -collapsed: true -className: hide-children \ No newline at end of file diff --git a/hack/docgen/cli/main.go b/hack/docgen/cli/main.go index 82db2cab2..7eb983a34 100644 --- a/hack/docgen/cli/main.go +++ b/hack/docgen/cli/main.go @@ -97,6 +97,15 @@ func main() { rootPath = os.Args[1] } + // normalize and ensure output directory exists + rootPath = filepath.Clean(rootPath) + + // 0o755 is an octal literal for Unix file permissions: rwxr-xr-x + // (owner can read/write/execute, group and others can read/execute) + if err := os.MkdirAll(rootPath, 0o755); err != nil { + log.Fatal(err) + } + fmt.Println("Scanning CLI docs rootPath: ", rootPath) cli := cmd.NewCliCmd() cli.Long = fmt.Sprintf("```\n%s\n```", cli.Long)