Skip to content

Exclude pages from the search bar #2218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nathaneastwood opened this issue Oct 10, 2023 · 2 comments
Closed

Exclude pages from the search bar #2218

nathaneastwood opened this issue Oct 10, 2023 · 2 comments
Labels
C-enhancement Category: Enhancement or feature request

Comments

@nathaneastwood
Copy link

Problem

I have some pages which have duplicate information. I'd like to be able to exclude pages and/or chapters from the search bar.

Proposed Solution

Maybe within [output.html.search] we could provide a list of pages to an exclude option?

Notes

No response

@nathaneastwood nathaneastwood added the C-enhancement Category: Enhancement or feature request label Oct 10, 2023
@szabgab
Copy link
Contributor

szabgab commented Mar 21, 2025

It can be done by a configuration entry that looks like this:

[output.html.search.chapter]
"individual/mathjax.md" = { enable = false }

See https://rust-lang.github.io/mdBook/format/configuration/renderers.html#outputhtmlsearchchapter

szabgab added a commit to szabgab/mdBook that referenced this issue Mar 21, 2025
Allow us to use different words to describe certain features to
make it easier for people to find it using their own vocabulary.
Without the need to sneak in the documentation all the possible words.

e.g. In this case searching for "exclude" could not help the
user as that word was not used in our documentation.

See rust-lang#2218
@nathaneastwood
Copy link
Author

Amazing - thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Enhancement or feature request
Projects
None yet
Development

No branches or pull requests

2 participants