From c2b8d37d4e667c5186f616dafdcf0de9f85c3bfe Mon Sep 17 00:00:00 2001 From: Arkan Ahmedov Date: Fri, 12 Jun 2026 17:56:20 +0300 Subject: [PATCH] feat(search): exclude code from the Pagefind index Register the rehype-pagefind-ignore plugin from igniteui-astro-components in the rehype pipeline. It marks code blocks and single character inline code with data-pagefind-ignore so Pagefind stops indexing their one letter tokens, which were producing weak, irrelevant prefix matches (for example a search for "twitter" matching the "t" in "keyof T" across unrelated API pages). --- src/integration.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/integration.ts b/src/integration.ts index 8819dbf398..beef78a68b 100644 --- a/src/integration.ts +++ b/src/integration.ts @@ -64,6 +64,7 @@ import { remarkMdLinks } from './plugins/remark-md-links'; import { remarkHtmlTransforms } from './plugins/remark-html-transforms'; import { rehypeTableWrapper } from 'igniteui-astro-components/plugins/rehype-table-wrapper'; import { rehypeHeadingAnchors } from 'igniteui-astro-components/plugins/rehype-heading-anchors'; +import { rehypePagefindIgnore } from 'igniteui-astro-components/plugins/rehype-pagefind-ignore'; import { rehypeStripEmptyParagraphs } from './plugins/rehype-strip-empty-paragraphs'; import { rehypeApiReferencesGrid } from './plugins/rehype-api-references-grid'; @@ -655,6 +656,7 @@ export function createDocsSite(options: CreateDocsSiteOptions = {} as CreateDocs rehypeHeadingAnchors, rehypeStripEmptyParagraphs, rehypeApiReferencesGrid, + rehypePagefindIgnore, ...((astroExtra as any).markdown?.rehypePlugins ?? []), ], },