docs: migrate to native Fumadocs search & UI fixes (#12732)

Changes:

- **Search**: Replaced Inkeep with Fumadocs' native built-in search
(createFromSource). Removed @inkeep/cxkit-react and custom search
dialogs.

- **Hydration Fix**: Removed markdown links from ### headings in
egress.mdx (across all versions) to fix the <a inside a> DOM mismatch
error.

- **Console Fix**: Added the missing key prop to <VersionSelector/> in
the layout to resolve the React list warning.

---------

Co-authored-by: Florian Forster <[email protected]>
Co-authored-by: Claude Fable 5.1 <[email protected]>
This commit is contained in:
Federico Coppede
2026-09-11 10:47:53 -07:00
committed by GitHub
co-authored by Florian Forster Claude Fable 5.1
parent 7e34f04361
commit 8ccd5b206f
12 changed files with 284 additions and 1385 deletions
@@ -2,7 +2,7 @@ import { test, describe, beforeEach, afterEach, mock } from 'node:test';
import assert from 'node:assert';
import fs from 'fs';
import path from 'path';
import { getCurrentRef, resetCache, downloadFileContent, isValidRef, safeLog } from './fetch-remote-content.mjs';
import { getCurrentRef, resetCache, downloadFileContent, isValidRef, safeLog, unwrapHeadingLinks, parseLsRemoteTags } from './fetch-remote-content.mjs';
const TEST_TMP_DIR = path.join(process.cwd(), '.test-tmp');
const MOCK_REPO_ROOT = path.join(TEST_TMP_DIR, 'mock-repo');
@@ -158,4 +158,45 @@ describe('fetch-remote-content', () => {
});
});
// --- parseLsRemoteTags Tests ---
describe('parseLsRemoteTags', () => {
test('extracts tag names and de-duplicates peeled annotated tags', () => {
const output = [
'aaa\trefs/tags/v4.17.3',
'bbb\trefs/tags/v4.17.3^{}',
'ccc\trefs/tags/v4.16.0',
'ddd\trefs/heads/main',
'',
].join('\n');
assert.deepStrictEqual(parseLsRemoteTags(output), [{ name: 'v4.17.3' }, { name: 'v4.16.0' }]);
});
});
// --- unwrapHeadingLinks Tests ---
describe('unwrapHeadingLinks', () => {
test('unwraps markdown links inside headings only', () => {
const input = [
'### [Identity Providers & Federation](/guides/integrate/identity-providers/introduction)',
'#### **1. [List my project roles](/reference/api/auth/AuthService.ListMyProjectPermissions)**',
'A paragraph with a [link](/kept) is left untouched.',
].join('\n');
const expected = [
'### Identity Providers & Federation',
'#### **1. List my project roles**',
'A paragraph with a [link](/kept) is left untouched.',
].join('\n');
assert.strictEqual(unwrapHeadingLinks(input), expected);
});
test('leaves images in headings and comments inside code fences alone', () => {
const input = [
'## ![logo](/img/logo.png) Title',
'```bash',
'# [not a heading](https://example.com)',
'```',
].join('\n');
assert.strictEqual(unwrapHeadingLinks(input), input);
});
});
});