diff --git a/cmd/uncloud/docs.go b/cmd/uncloud/docs.go index c5ad4cb3..d5ab7f3b 100644 --- a/cmd/uncloud/docs.go +++ b/cmd/uncloud/docs.go @@ -91,6 +91,18 @@ func postProcessMarkdown(filename string) error { // Escape to avoid Docusaurus treating it as an HTML tag. content = strings.ReplaceAll(content, "", "\\") + // Remove broken links to completion docs. + if strings.Contains(content, "[uc completion") { + lines := strings.Split(content, "\n") + var filteredLines []string + for _, line := range lines { + if !strings.Contains(line, "[uc completion") { + filteredLines = append(filteredLines, line) + } + } + content = strings.Join(filteredLines, "\n") + } + // Adjust heading levels. Process from shortest to longest to avoid double replacements. replacements := []struct { old, new string diff --git a/website/docs/9-cli-reference/uc.md b/website/docs/9-cli-reference/uc.md index b8b2104a..10cbbacb 100644 --- a/website/docs/9-cli-reference/uc.md +++ b/website/docs/9-cli-reference/uc.md @@ -15,7 +15,6 @@ A CLI tool for managing Uncloud resources such as clusters, machines, and servic * [uc build](uc_build.md) - Build services from a Compose file. * [uc caddy](uc_caddy.md) - Manage Caddy reverse proxy service. -* [uc completion](uc_completion.md) - Generate the autocompletion script for the specified shell * [uc ctx](uc_ctx.md) - Switch between different cluster contexts. Contains subcommands to manage contexts. * [uc deploy](uc_deploy.md) - Deploy services from a Compose file. * [uc dns](uc_dns.md) - Manage cluster domain in Uncloud DNS.