Use Starlight sidebar user-config format for <StarlightPage /> sidebar prop#2168
Conversation
🦋 Changeset detectedLatest commit: b569fd2 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 |
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
delucis
left a comment
There was a problem hiding this comment.
Oh boy, the code is so much simpler, not sure why we didn’t think to do it to begin with 😁
Looks good to me — I think you can remove the test files. Also needs a changeset explaining how to migrate if you’re using <StarlightPage>.
Yeah, I had the exact same thought when working on the changes, not sure why either 😅 I've removed the test pages and added a changeset (altho, not super happy with it, tried to use a |
delucis
left a comment
There was a problem hiding this comment.
I think the examples are good here! Yes, it’s big, but I agree this is clear (I also quickly tried a diff but it feels more confusing than helpful).
…idebar` prop (withastro#2168) Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

Description
This PR changes the data accepted by the
sidebarprop of the<StarlightPage />component used by custom routes.With this change, the
sidebarprop can now accept a sidebar configuration identical to the one used by thesidebarStarlight configuration.A few demo custom pages have been temporarily added to the docs to play around with the changes.
Remaining task
docs/astro.config.mjsdocs/src/pages/test-1.astrodocs/src/pages/test-2.astrodocs/src/pages/test-[index].astroIdea
Could be worth maybe adding a new example to https://starlight-examples.netlify.app/ showing how to re-use a sidebar configuration between the Starlight configuration and a custom page where the custom page appends a few more items to the sidebar.