Skip to content
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

Add chapter name to search result breadcrumbs #1389

Merged
merged 2 commits into from
Jan 4, 2021
Merged

Add chapter name to search result breadcrumbs #1389

merged 2 commits into from
Jan 4, 2021

Conversation

avitex
Copy link
Contributor

@avitex avitex commented Nov 25, 2020

Currently the search result breadcrumbs only contain the chapter's parents, and not the chapter name itself.
This PR adds the chapter name to the breadcrumbs for improved searchability.

Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I agree the old breadcrumbs were a little strange, I'm uncertain why they work they way they do.

One minor oddity with this is that if it matches the top-level heading, then it will be duplicated. For example, searching for "highlight" in mdbook's guide has a breadcrumb of "Format » Theme » Syntax highlighting » Syntax Highlighting". I don't think this is too much of a problem, so we can probably tweak it later if it seems too annoying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants