fix(docs): preserve canonical maturity product labels

This commit is contained in:
Peter Steinberger
2026-07-17 09:44:47 -04:00
parent 4ef4323db9
commit fee4490fe4
3 changed files with 70 additions and 37 deletions

View File

@@ -0,0 +1,27 @@
package main
import (
"os"
"slices"
"testing"
)
func TestTaxonomyCanonicalProductLinksAreProtected(t *testing.T) {
content, err := os.ReadFile("../../docs/maturity/taxonomy.md")
if err != nil {
t.Fatal(err)
}
_, body := splitFrontMatter(string(content))
protected := extractProtectedMarkdownLinkLabels(body)
for _, want := range []string{
"link:/channels/googlechat:Google Chat",
"link:/channels/imessage:iMessage",
"link:/channels/msteams:Microsoft Teams",
"link:/channels/whatsapp:WhatsApp",
"link:/start/openclaw:OpenClaw",
} {
if !slices.Contains(protected, want) {
t.Errorf("missing protected taxonomy link %q", want)
}
}
}

View File

@@ -157,8 +157,14 @@ Options:
function familyTitle(value: string): string {
const titles: Record<string, string> = {
googlechat: "Google Chat",
imessage: "iMessage",
msteams: "Microsoft Teams",
openai: "OpenAI",
openclaw: "OpenClaw",
"platform-app": "Platform",
"provider-tool": "Provider and tool",
whatsapp: "WhatsApp",
};
return (
titles[value] ??