docs(sidebar): collapse exploding skills tree to a single Skills node (#18259)

* docs(sidebar): collapse exploding skills tree to a single Skills node

The Skills sub-tree in the left sidebar expanded to 200+ entries
(22 bundled categories + 15 optional categories, every skill a page).
That's most of the nav on a first visit — docs for the actual product
get drowned in it.

Collapse the sidebar to:

  Skills
    godmode              (hand-written spotlight)
    google-workspace     (hand-written spotlight)
    Bundled catalog      (reference/skills-catalog — table of all bundled)
    Optional catalog     (reference/optional-skills-catalog — table of all optional)

Per-skill pages still generate and are still reachable at their URLs;
they're linked from the two catalog tables and from the Skills overview
page. They just don't appear in the left nav anymore.

sidebars.ts goes from 649 lines to 247. generate-skill-docs.py loses
the bundled/optional sidebar render helpers.

Also picks up incidental generator output drift on current main
(comfyui skill content refresh; 4 new skill pages for
devops-kanban-orchestrator, devops-kanban-worker,
productivity-here-now, productivity-shopify; two catalog refreshes).
These are what the generator produces on main today — keeping them
committed avoids the next docs build showing 'working tree dirty'.

* docs(sidebar): drop godmode and google-workspace spotlight pages

Keep the Skills sidebar node strictly principled: two catalog links,
nothing else. There was no rule for which skills got spotlight pages
and which got auto-generated pages — just that these two happened to
be hand-written first.

Both pages still build and are still reachable at
/docs/user-guide/skills/godmode and
/docs/user-guide/skills/google-workspace. They're linked from the
catalog tables and the Skills overview page.

Sidebar Skills node now:
  Skills
    ├── Bundled catalog
    └── Optional catalog
This commit is contained in:
Teknium 2026-04-30 23:08:22 -07:00 committed by GitHub
parent 50c046331d
commit 7c6c5619a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 1264 additions and 792 deletions

View file

@ -621,24 +621,25 @@ def build_sidebar_items(entries: list[tuple[dict[str, Any], dict[str, Any]]]) ->
def write_sidebar(entries):
data = build_sidebar_items(entries)
# Render just the "Skills" block TS for inclusion.
def render_items(cats: list[dict]) -> str:
lines = []
for c in cats:
lines.append(" {")
lines.append(" type: 'category',")
lines.append(f" label: '{c['label']}',")
lines.append(" collapsed: true,")
lines.append(" items: [")
for item in c["items"]:
lines.append(f" '{item}',")
lines.append(" ],")
lines.append(" },")
return "\n".join(lines)
bundled_block = render_items(data["bundled_categories"])
optional_block = render_items(data["optional_categories"])
# The per-skill pages (`build_sidebar_items(entries)`) are still generated
# as standalone docs under `website/docs/user-guide/skills/{bundled,optional}/`
# and reachable via the catalog pages in Reference — but we intentionally
# do NOT explode them into the left sidebar. Two hundred-plus skill entries
# drown the actual product docs and make the site feel overwhelming to
# first-time visitors.
#
# Sidebar now shows:
# Skills
# ├── Bundled catalog → (link to reference/skills-catalog)
# └── Optional catalog → (link to reference/optional-skills-catalog)
#
# The catalog pages are auto-regenerated tables with a link to every skill.
# Individual skill pages (including the two formerly hand-written guides,
# godmode and google-workspace) are still reachable at their URLs and are
# linked from the catalog tables and from the Skills overview page — they
# just aren't promoted in the left sidebar, because there's no principled
# rule for which skills would get promoted and which wouldn't.
_ = build_sidebar_items(entries) # still called for any side effects / validation
skills_subtree = (
" {\n"
@ -646,24 +647,8 @@ def write_sidebar(entries):
" label: 'Skills',\n"
" collapsed: true,\n"
" items: [\n"
" 'user-guide/skills/godmode',\n"
" 'user-guide/skills/google-workspace',\n"
" {\n"
" type: 'category',\n"
" label: 'Bundled (by default)',\n"
" collapsed: true,\n"
" items: [\n"
+ bundled_block
+ "\n ],\n"
" },\n"
" {\n"
" type: 'category',\n"
" label: 'Optional (installable)',\n"
" collapsed: true,\n"
" items: [\n"
+ optional_block
+ "\n ],\n"
" },\n"
" 'reference/skills-catalog',\n"
" 'reference/optional-skills-catalog',\n"
" ],\n"
" },\n"
)