mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
fix: broken links to completions docs in CLI reference
This commit is contained in:
@@ -91,6 +91,18 @@ func postProcessMarkdown(filename string) error {
|
|||||||
// Escape <id> to avoid Docusaurus treating it as an HTML tag.
|
// Escape <id> to avoid Docusaurus treating it as an HTML tag.
|
||||||
content = strings.ReplaceAll(content, "<id>", "\\<id>")
|
content = strings.ReplaceAll(content, "<id>", "\\<id>")
|
||||||
|
|
||||||
|
// 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.
|
// Adjust heading levels. Process from shortest to longest to avoid double replacements.
|
||||||
replacements := []struct {
|
replacements := []struct {
|
||||||
old, new string
|
old, new string
|
||||||
|
|||||||
@@ -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 build](uc_build.md) - Build services from a Compose file.
|
||||||
* [uc caddy](uc_caddy.md) - Manage Caddy reverse proxy service.
|
* [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 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 deploy](uc_deploy.md) - Deploy services from a Compose file.
|
||||||
* [uc dns](uc_dns.md) - Manage cluster domain in Uncloud DNS.
|
* [uc dns](uc_dns.md) - Manage cluster domain in Uncloud DNS.
|
||||||
|
|||||||
Reference in New Issue
Block a user