mkdocs-material icon indicating copy to clipboard operation
mkdocs-material copied to clipboard

Search: breadcrumbs to signal context of a document

Open bradumbaugh opened this issue 2 years ago • 8 comments

Contribution guidelines

I want to suggest an idea and checked that ...

  • [X] ... to my best knowledge, my idea wouldn't break something for other users
  • [X] ... the documentation does not mention anything about my idea
  • [X] ... there are no open or closed issues that are related to my idea

Description

Might be nice to have breadcrumb-like context on search results, so it's more clear where each result fits in the overall IA of the site. This would provide meaning/context to help users decide whether a given search result represents what they're looking for.

For example, when I search for changelog on the Material for MkDocs site right now, here's what comes back:

Screen Shot 2022-04-01 at 10 14 42 AM

I'm thinking some kind of small font, above the title of the doc, that has breadcrumbs leading up to the page associated with the result. So, the search results for changelog might be:

Getting Started > Changelog

Insiders > Getting Started > Changelog

Just an idea, feel free to close out!

Use Cases

Helps provide context when reviewing search results.

Screenshots / Mockups

No response

bradumbaugh avatar Apr 01 '22 16:04 bradumbaugh

Thanks for suggesting! "Changelog" is exactly the evil example I had on my list for ages 😂 I'm planning to do a slight face-lift of the search at some point, probably later this year. Breadcrumbs might be a good idea, and since we have a new built-in search plugin anyway, we could add the necessary information to the pages. I'll investigate.

squidfunk avatar Apr 01 '22 17:04 squidfunk

You can now have breadcrumbs on the page ^breadcrumbs if you use insiders-4.28.0 or higher. I did not find breadcrumbs for search in the Material for MkDocs manual though. Maybe having the breadcrumbs on the page figured out helps with getting it working for search later.

HonkingGoose avatar Feb 01 '23 10:02 HonkingGoose

Seconded, this would be very useful to have! We have this issue with a lot of our common search terms Screenshot 2023-02-07 at 11 53 17 AM

hhaslam11 avatar Feb 07 '23 19:02 hhaslam11

It's definitely coming with the next iteration of search 😊

squidfunk avatar Feb 07 '23 20:02 squidfunk

@squidfunk are there any news on this topic? I'd love for this to work, this would be a tremendous help in structuring and finding things in large scale documentation projects! :)

caiaga avatar Jun 23 '23 07:06 caiaga

Still working on it. The new search is the next major feature that's coming out, and it will solve many, if not all of the change requests that are currently open and more. Please understand that this is a pretty big fish to fry, as we're implementing this from scratch, but you can definitely expect it to hit the shelves later this year.

If you can share your project, please do! It would be awesome to have some projects for testing this before shipping.

squidfunk avatar Jun 23 '23 09:06 squidfunk

Still working on it. The new search is the next major feature that's coming out, and it will solve many, if not all of the change requests that are currently open and more. Please understand that this is a pretty big fish to fry, as we're implementing this from scratch, but you can definitely expect it to hit the shelves later this year.

Do I need a Insiders-membership pass to try your delicious bread-crumbed-fish then? 😉

If you can share your project, please do! It would be awesome to have some projects for testing this before shipping.

We use Material for MkDocs for the Renovate documentation. We have a lot of similar pages where the breadcrumb would help us. Here's a link to the renovatebot.github.io repository. You can use GitHub's Codespaces to get a preview of the site working quickly.

HonkingGoose avatar Jun 23 '23 10:06 HonkingGoose

Please see the announcement in #6307.

squidfunk avatar Nov 07 '23 14:11 squidfunk