From 8ddc151435a031acf40e1603153ee35ae4147bec Mon Sep 17 00:00:00 2001 From: sudacode Date: Fri, 14 Aug 2026 21:50:08 -0700 Subject: [PATCH] docs: hide unfinished feature demos from sidebar --- changes/hide-feature-demos.md | 4 ++++ docs-site/.vitepress/config.ts | 1 - docs-site/links.test.ts | 7 +++++-- 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 changes/hide-feature-demos.md diff --git a/changes/hide-feature-demos.md b/changes/hide-feature-demos.md new file mode 100644 index 00000000..63c1a6dd --- /dev/null +++ b/changes/hide-feature-demos.md @@ -0,0 +1,4 @@ +type: docs +area: documentation + +- Hid the unfinished feature demos page from the documentation sidebar while keeping its direct URL available. diff --git a/docs-site/.vitepress/config.ts b/docs-site/.vitepress/config.ts index 1171bea8..42641f32 100644 --- a/docs-site/.vitepress/config.ts +++ b/docs-site/.vitepress/config.ts @@ -306,7 +306,6 @@ const sidebar: DefaultTheme.SidebarItem[] = [ { text: 'Usage', link: '/usage' }, { text: 'Mining Workflow', link: '/mining-workflow' }, { text: 'Launcher Script', link: '/launcher-script' }, - { text: 'Feature Demos', link: '/demos' }, ], }, { diff --git a/docs-site/links.test.ts b/docs-site/links.test.ts index 855d33ed..6ade4f55 100644 --- a/docs-site/links.test.ts +++ b/docs-site/links.test.ts @@ -21,6 +21,7 @@ function slugify(heading: string): string { } const EXCLUDED_PAGES = new Set(['README.md']); +const UNLISTED_ROUTES = new Set(['/demos']); const PUBLIC_PREFIXES = ['/assets/', '/screenshots/', '/config.example.jsonc', '/favicon']; function loadPages(): Map { @@ -114,7 +115,7 @@ test('slugify matches the VitePress cases these docs actually rely on', () => { expect(slugify('2. Install SubMiner')).toBe('_2-install-subminer'); }); -test('every docs page is reachable from the sidebar', async () => { +test('every docs page is reachable from the sidebar unless explicitly unlisted', async () => { const { default: config } = await import('./.vitepress/config'); const sidebar = config.themeConfig?.sidebar as Array<{ items?: Array<{ text: string; link?: string }>; @@ -127,6 +128,8 @@ test('every docs page is reachable from the sidebar', async () => { } } - const orphans = [...pages.keys()].filter((route) => !linked.has(route)); + const orphans = [...pages.keys()].filter( + (route) => !linked.has(route) && !UNLISTED_ROUTES.has(route), + ); expect(orphans).toEqual([]); });