1
0
mirror of synced 2026-02-06 19:05:55 +00:00

fix links

- change links in cli docs to be relative (making mkdocs AND hugo happy)
	- run 'make docs'
	- fix other links

Signed-off-by: Daniel Holbach <daniel@weave.works>
This commit is contained in:
Daniel Holbach
2021-03-26 14:28:24 +01:00
parent dea4a67639
commit 32f94bab97
120 changed files with 235 additions and 237 deletions

View File

@@ -32,8 +32,7 @@ title: "%s"
`
var (
cmdDocPath string
cmdDocURLPath string
cmdDocPath string
)
var docgenCmd = &cobra.Command{
@@ -45,7 +44,6 @@ var docgenCmd = &cobra.Command{
func init() {
docgenCmd.Flags().StringVar(&cmdDocPath, "path", "./docs/cmd", "path to write the generated documentation to")
docgenCmd.Flags().StringVar(&cmdDocURLPath, "url-path", "/cmd/", "URL path the documentation is available at")
rootCmd.AddCommand(docgenCmd)
}
@@ -67,5 +65,5 @@ func frontmatterPrepender(filename string) string {
func linkHandler(name string) string {
base := strings.TrimSuffix(name, path.Ext(name))
return cmdDocURLPath + strings.ToLower(base) + "/"
return "../" + strings.ToLower(base) + "/"
}