fix: customCSS catch and throw error - #3555
Conversation
🦋 Changeset detectedLatest commit: a052677 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 project configuration. |
|
Hello! Thank you for opening your first PR to Starlight! ✨ Here’s what will happen next:
|
delucis
left a comment
There was a problem hiding this comment.
Thanks for the PR @Its-Just-Nans! I actually think we can avoid this code change and instead check it ourselves in the Starlight configuration schema would be my guess. We have access there to the public directory name, so could easily check for values in the customCss array that start with the public directory. That way we avoid hitting the Astro error altogether.
delucis
left a comment
There was a problem hiding this comment.
Thanks again for the PR @Its-Just-Nans!
I just took the time to update it to run the validation alongside all our other user config validation logic and throw a clear error explaining how to resolve the issue.
Thanks to you for all your work. Just a little question, the goal was also to help the user by saying "you can add css using the head configuration of starlight". Why not adding that part? Thanks you |
That’s not the best approach: you really should use Of course, using |
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

Related to #3554