-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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 breadcrumbs to docs #6096
Comments
Yes, we could add that option, and probably turn it on by default if it looks good. I'm fine with an opinionated design as long as it can be turned off SEO metas should probably always be there even if the option is turned off?
There's already a component in Infima: https://infima.dev/docs/components/breadcrumbs Seems only used on the search page 😅 : https://docusaurus.io/search?q=doc |
Is it ok if I start working on this? Or will the implementation just be @Josh-Cena |
@christopherklint97 You can start with |
It is probably unnecessary to provide additional metadata here. We now have a theme-common I'd like to use more context/hooks in the future instead of manipulation props, considering the doc metadata/sidebar should be available in React context wherever those hooks will be called (ie in Doc page components, including custom made components). |
When I say metadata I don't mean props. I mean hooks + |
Have you read the Contributing Guidelines on issues?
Description
Docs should have breadcrumbs in addition to sidebar.
Has this been requested on Canny?
No
Motivation
I've just built this feature for someone: PatelN123/Digital-Support-Notes#1 (That person just wanted the primary category, but I did extract the entire breadcrumb list)
It wasn't quite ergonomic, and I think it would make sense to make itself into the core.
API design
It would be opt-in, something like
showBreadcrumbs
in the docs plugin. I think we can also set a metadata to help with SEO?If we don't want an opinionated implementation for the UI component, we can just implement a
useBreadCrumbs
in theme-common and let users wrapDocItem
to implement what they want.Have you tried building it?
Yes, see that PR for how I did it.
Self-service
The text was updated successfully, but these errors were encountered: