Skip to content

Commit 5a1e61c

Browse files
committed
fix: broken links to completions docs in CLI reference
1 parent db60a81 commit 5a1e61c

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

cmd/uncloud/docs.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,18 @@ func postProcessMarkdown(filename string) error {
9191
// Escape <id> to avoid Docusaurus treating it as an HTML tag.
9292
content = strings.ReplaceAll(content, "<id>", "\\<id>")
9393

94+
// Remove broken links to completion docs.
95+
if strings.Contains(content, "[uc completion") {
96+
lines := strings.Split(content, "\n")
97+
var filteredLines []string
98+
for _, line := range lines {
99+
if !strings.Contains(line, "[uc completion") {
100+
filteredLines = append(filteredLines, line)
101+
}
102+
}
103+
content = strings.Join(filteredLines, "\n")
104+
}
105+
94106
// Adjust heading levels. Process from shortest to longest to avoid double replacements.
95107
replacements := []struct {
96108
old, new string

website/docs/9-cli-reference/uc.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ A CLI tool for managing Uncloud resources such as clusters, machines, and servic
1515

1616
* [uc build](uc_build.md) - Build services from a Compose file.
1717
* [uc caddy](uc_caddy.md) - Manage Caddy reverse proxy service.
18-
* [uc completion](uc_completion.md) - Generate the autocompletion script for the specified shell
1918
* [uc ctx](uc_ctx.md) - Switch between different cluster contexts. Contains subcommands to manage contexts.
2019
* [uc deploy](uc_deploy.md) - Deploy services from a Compose file.
2120
* [uc dns](uc_dns.md) - Manage cluster domain in Uncloud DNS.

0 commit comments

Comments
 (0)