#data-pagefind-ignore
3 messages · Page 1 of 1 (latest)
Hi @formal bluff. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
To exclude a part of a page from the search index, you can use the data-pagefind-ignore attribute. This attribute should be added to the HTML element that contains the content you want to ignore. Pagefind will then ignore the content inside this element. Here's an example:
<div data-pagefind-ignore>
This text will be hidden from search.
</div>
If the content you want to ignore keeps showing up, make sure that the data-pagefind-ignore attribute is correctly added to the right element and that there are no typos or syntax errors.
To exclude an entire page from the search index, you can add pagefind: false to the page’s frontmatter. Here's an example:
---
title: Content to hide from search
pagefind: false
---
This will prevent the page from being included in the Pagefind search index.