Skip to content

Exclude pages from search #8230

Answered by kamilkrzyskow
xmatthias asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @xmatthias,
your snippets shouldn't be inside of your docs directory, the Snippets extension copies the text files as is, without support for MkDocs meta header. MkDocs creates a Page object from every Markdown file inside docs, and the meta only works in that case.

Either move the snippets outside docs and change the base_path of the Snippets extension, or use the exclude_docs option to turn off the Page object creation and remove the search exclude header.

Or maybe I misunderstood, and you're looking to exclude sections that are inserted via the snippets extension, then maybe this part of the documentation will help you:

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@xmatthias
Comment options

Answer selected by xmatthias
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants