Starlight Route Data Middleware must not conflict with Astro's middleware#3018
Starlight Route Data Middleware must not conflict with Astro's middleware#3018delucis merged 19 commits intowithastro:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 7830d9d 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
|
yippie, my first ever changeset in the Starlight package 🎉
|
Shall we include in the changelog that setting |
(change link to updated regex101)
delucis
left a comment
There was a problem hiding this comment.
Nice work @trueberryless and @HiDeoo getting testing set up as well 🙌
Suggesting some further details.
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
|
I just realized that the |
delucis
left a comment
There was a problem hiding this comment.
Great work here @trueberryless — I think it’s ready to go!
Made a couple of tiny final tweaks:
-
Now we have the config reference (well spotted that it was missing!) I removed the note from the route data guide about not conflicting with Astro’s middleware. My rationale for this is that in the context of a guide the focus is on accomplishing a task and these steps already suggest a specific non-conflicting file name for the middleware module. With the great new error message plus the note in config reference, I think it’s OK not to add this extra information in the middle of the goal-oriented guide.
-
Tweaked some config reference wording just slightly to remove “custom” from “custom route middleware” as all route middleware is technically “custom”, so I think we could simplify there.
-
Fixed a typo in a test name.
Thanks for the thoughtful way you went from experiencing issues yourself with the clash between middleware paths to thinking of this solution to providing clear errors to Starlight users. Lovely work!
…ware (withastro#3018) Co-authored-by: HiDeoo <494699+HiDeoo@users.noreply.github.com> Co-authored-by: delucis <357379+delucis@users.noreply.github.com>

Description
As I noticed myself, the current documentation does not point out that Starlight's custom middleware may or may not conflict with Astro's middleware.
Related discussion: #3017 (pls comment your thoughts there, this PR is just an example)