-
Notifications
You must be signed in to change notification settings - Fork 2.1k
doc/starlight: add route middleware to fix edit link #21780
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
Conversation
LasseRosenow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, thank you!
doc/starlight/src/routeData.ts
Outdated
| * As soon as base directory changes get fixed, this should be removed | ||
| * again! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an open issue in Starlight for that so the status can be tracked?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is: withastro/starlight#3332
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not an issue, but at least a PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added link
crasbe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please squash :)
|
🎾 squash |
Contribution description
Since we currently use a symlink (as introduced in bcd9fbe to comply with the (broken) docs folder scanning of starlight, this will break the edit link since, while technically correct, our symlink will be shown as github.com/RIOT-OS/RIOT/doc/guides/src/content/docs/foobar.md.
Since github can't parse symlinks, we need to modify the editUrl through a route middleware in order for the edit link to still function.
As soon as base directory changes get fixed, this should be removed again!
(Ty to @LasseRosenow for noticing that)
Testing procedure
Issues/PRs references