Navbar actions next to breadcrumbs #11391
-
NextJS documentation (example) shows an action and a dropdown in the navbar next to the breadcrumbs. Does anyone know if there's a way to replicate this in Docusaurus? Are there any built-in features, or would it require swizzling a few components? If so, which component would you use for the popover? ![]() ![]() |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
We don't have any popover component in our theme currently, but you could provide one yourself and swizzle the breadcrumb component to display actions on the right. The closest you could use is our navbar dropdown. To get the link to a Markdown file, you can probably hack the "editUrl" feature to compute the raw Markdown file link from it:
Currently, we don't embed the source Markdown files on your static deployment, so you'd rather link to GitHub. However, you can configure your site to do so with the |
Beta Was this translation helpful? Give feedback.
-
I implemented the feature by swizzling the breadcrumb component and adding my own action and popover. For this component in particular, I didn’t build a new one from scratch instead, I reused the existing dropdown CSS classes. That way, it looks and feels exactly like part of the kit. For the curious, you can see it in action for example on this page of Juno's docs: https://juno.build/docs/intro Here’s the PR: junobuild/docs#511 Screenshots: ![]() ![]() |
Beta Was this translation helpful? Give feedback.
I implemented the feature by swizzling the breadcrumb component and adding my own action and popover. For this component in particular, I didn’t build a new one from scratch instead, I reused the existing dropdown CSS classes. That way, it looks and feels exactly like part of the kit.
For the curious, you can see it in action for example on this page of Juno's docs: https://juno.build/docs/intro
Here’s the PR: junobuild/docs#511
Screenshots: