-
-
Notifications
You must be signed in to change notification settings - Fork 186
feat: new routing schema #674
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
garthdw
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.
Just a couple potential issues. Otherwise looks good
|
|
||
| // /package/code/* → /code/* | ||
| // /package/code/* → /package-code/* | ||
| if (path.startsWith('/package/code/')) { |
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.
Does this not break https://www.npmjs.com/package/code
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.
Good catch! will update
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.
fixed
| if (path.startsWith('/package/')) { | ||
| return navigateTo(path.replace('/package/', '/'), { replace: true }) | ||
| // /package/docs/* → /package-docs/* | ||
| if (path.startsWith('/package/docs/')) { |
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.
Does this not break https://www.npmjs.com/package/doc
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.
/package/doc is working fine but /package/docs it not, will fix it, thanks!
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.
fixed
|
Did we decide on anything for orgs/scopes? https://npmx-bc2otz4gu-poetry.vercel.app/@nuxt and users https://npmx-bc2otz4gu-poetry.vercel.app/~atinux |
Nothing for those were discussed as part of this change, this is purely for packages, docs and code pages. |
This PR introduces new canonical routes for:
/{name} -> /package/{name})/code/{name} -> /package-code/{name})/docs/{name} -> /package-docs/{name})Route names were not changed so most of the existing links didn't require an update.
Following the discussion we had a couple days ago in discord we agreed that from now on we will follow these rules:
Keep in mind some of the pages are not added yet.
Old redirect logic was updated so that existing URLs will point to the new pages on client side.
Solves #392 and other routing related issues like searching for
searchetc.