Configurable navbar #963
Replies: 5 comments 15 replies
-
Thanks for the issue @LuHugo! We’ll soon release #709, which will make it quite easy to add a custom Astro component to the navbar for use cases like this. I’d love for us to wait and see whether that works well for people or whether we still need a custom configuration-based API. |
Beta Was this translation helpful? Give feedback.
-
It does not work well for me. I want to use starlight on a page with other, non-starlight pages (using additional content collections, so they cannot be simply markdown files.). I am able to add links from the navigation menu to these pages by overriding the But the real problem is, that I fail to use the Please again have a look at how docusaurus has solved this very conveniently for the users. Basically the idea should be that you have pages AND docs AND a blog etc. So instead of "taking over everything" starlight should be more of an additional feature / part of the page. Right now its usage basically cripples my site in the sense that I can only use markdown. Maybe this could be solved by refactoring the |
Beta Was this translation helpful? Give feedback.
-
This is a much needed basic feature in Starlight. Many other static site generators offer a way to add navbar menu items with dropdowns. Some examples: |
Beta Was this translation helpful? Give feedback.
-
I got a basic site up and running quickly, but this issue has been bogging me down me down for hours. I agree this is a very basic feature, and it should not be difficult for new users. As far as I can tell, there is no way to add navbar items. You can, however, override an adjacent component (theme selector, title, etc) and shoehorn in some links before/after the otherwise-unrelated component. From a software organization/architecture standpoint, this is yucky and indirect. From an onboarding perspective, it creates a lot of pain and confusion for a new user task that should be very simple. ( For instance, I am now trying to troubleshoot an error in the Search component because I overrode the SiteTitle component, because I wanted to add some general links in a universally expected place on the page..? ) |
Beta Was this translation helpful? Give feedback.
-
I also found the complexity of adding top level items with a sidebar that shows the state of said page instead of the top level sidebar much higher than expected. There is a plugin for that but it will not work once you start overriding components. I don't mind adapting my overridden components from starlight, but then to merge this with plugin-specific logic you ultimately end up just rebuilding it for yourself. |
Beta Was this translation helpful? Give feedback.
-
What version of
starlight
are you using?0.10.2
What is your idea?
As the title says, we need a configurable navigation bar menu.
The navbar option can be added to the starlight configuration item. navbar contains the data needed to generate the menu。
For example:
Why is this feature necessary?
Can organize website navigation more freely
Do you have examples of this feature in other projects?
Participation
Beta Was this translation helpful? Give feedback.
All reactions