From ffb6edb7739033524e313cf07b649db928329939 Mon Sep 17 00:00:00 2001 From: Nikhil Kumar Rajak Date: Fri, 31 Jul 2026 16:10:05 +0000 Subject: [PATCH 1/2] fix(sidebar): add groups for namespaced plugins --- plugins/shared/categories.mjs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/plugins/shared/categories.mjs b/plugins/shared/categories.mjs index 06dadc96..7af9d9b5 100644 --- a/plugins/shared/categories.mjs +++ b/plugins/shared/categories.mjs @@ -8,6 +8,26 @@ export const CATEGORY_RULES = [ label: 'Optimization', match: reflection => /^optimize\./i.test(reflection.getFullName()), }, + { + category: 'container', + label: 'Container', + }, + { + category: 'debug', + label: 'Debug', + }, + { + category: 'experiments', + label: 'Experiments', + }, + { + category: 'ids', + label: 'IDs', + }, + { + category: 'javascript', + label: 'JavaScript', + }, { category: 'plugins', label: 'Plugins', From e06d60cff31da82e08d679174c4025a53eeb9d5f Mon Sep 17 00:00:00 2001 From: Nikhil Kumar Rajak Date: Fri, 31 Jul 2026 18:20:24 +0000 Subject: [PATCH 2/2] fixup: label nested namespace overviews --- plugins/processor/site.mjs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/processor/site.mjs b/plugins/processor/site.mjs index 638aba73..48a695b0 100644 --- a/plugins/processor/site.mjs +++ b/plugins/processor/site.mjs @@ -9,10 +9,16 @@ const SIDEBAR_GROUP_NAME = 'API'; const getFirstAtxHeading = text => text.match(/^#\s+(.+)$/m)?.[1]?.trim(); -const getFirstPathSegment = url => url.replace(/^\//, '').split('/')[0]; +const getPathSegments = url => url.replace(/^\//, '').split('/'); + +const getFirstPathSegment = url => getPathSegments(url)[0]; + +const getPathDepth = url => getPathSegments(url).length; const defaultLabelFor = (target, url) => { - if (url.endsWith('/index.md')) return 'Overview'; + if (url.endsWith('/index.md')) { + return getPathDepth(url) === 2 ? 'Overview' : target.name; + } if (url.endsWith('/types.md')) return 'Types'; return target.name; };