-
-
Notifications
You must be signed in to change notification settings - Fork 531
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
feat: multiple sidebars support #687
Conversation
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
🦋 Changeset detectedLatest commit: 8633fd4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
b256d21
to
66c5dc6
Compare
Thanks for trying to tackle this @scarf005! There’s a lot of considerations going into how to implement a feature that has as a big an impact as this one. It might be best to spend some time discussing what an API should look like and all the ways it interacts with different parts of how Starlight works to make sure we understand all the use cases and implications. I’d suggest we discuss in #658 first, before looking at implementing anything, so that we don’t risk sinking too much time into building code that might not end up being the solution we go for. Still appreciate you trying to figure this out though! |
I see, thanks for the consideration. opening it as it's mostly 'feature complete' and could spark some ideas. |
Closing as it is now somewhat stale and our component overrides system offers some workarounds while we figure out the bigger picture. Thanks again for the PR! |
Do you have any example on how the component ovverides let me achieve multiple sidebars? |
@asturur Here’s one example of using the URL of the current page to filter the sidebar for different products: https://stackblitz.com/edit/github-dubgkv?file=src%2Foverrides%2FSidebar.astro |
@delucis Thanks for your example. I am a designer playing around with starlight, trying to implement customized sidebars per route. Your example helps, but Pagination and your styling example only work on the first level ob the subdirectory. |
I figured it out in case you're still interested. All you need to do is change the definition of const currentBase = `/${Astro.url.pathname.split('/')[1]}`; Now, it only considers the first segment in the path. |
What kind of changes does this PR include?
Description
navgroups-showcase.mp4
sidebar
configuration can be a record of sidebars with links to match from.examples/navbars
to demonstrate new navbar support.TODO
Help Needed