Skip to content

Commit f98f986

Browse files
authored
Merge branch 'main' into consolidate-common-concepts
2 parents f782d78 + 84b38b5 commit f98f986

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/get_pack_commands.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const (
2222
gendocFrontmatterTemplate = `+++
2323
title="%s"
2424
no_edit="true"
25+
aliases=[ "/docs/tools/pack" ]
2526
+++
2627
<!--more-->
2728
`
@@ -30,7 +31,8 @@ no_edit="true"
3031
var filePrepender = func(filename string) string {
3132
name := filepath.Base(filename)
3233
name = strings.Replace(name, ".md", "", -1)
33-
return fmt.Sprintf(gendocFrontmatterTemplate, strings.Replace(name, "_", " ", -1))
34+
presentationName := strings.Replace(name, "_", " ", -1)
35+
return fmt.Sprintf(gendocFrontmatterTemplate, presentationName)
3436
}
3537

3638
var linkHandler = func(name string) string {
@@ -52,7 +54,7 @@ func main() {
5254
}
5355

5456
if _, err := os.Stat(filepath.Join(outputPath, indexFile)); os.IsNotExist(err) {
55-
if err := ioutil.WriteFile(filepath.Join(outputPath, indexFile), []byte(filePrepender("Pack CLI")), os.ModePerm); err != nil {
57+
if err := os.WriteFile(filepath.Join(outputPath, indexFile), []byte(filePrepender("Pack CLI")), os.ModePerm); err != nil {
5658
log.Fatal(err)
5759
}
5860
}

0 commit comments

Comments
 (0)