-
Notifications
You must be signed in to change notification settings - Fork 26k
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
Moving middleware file #36009
Merged
Merged
Moving middleware file #36009
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
441ad33
moving middleware file and highlighting that it is beta
timeyoutakeit fd6394f
updating redirect
timeyoutakeit 7e42e32
Update docs/manifest.json
timeyoutakeit 548c83e
ran linting
timeyoutakeit 964254c
changing location to fix broken test
timeyoutakeit 0840383
fixing redirected file
timeyoutakeit 4a4eb52
Merge branch 'canary' into middleware-updates
timeyoutakeit e1d3ce3
Merge branch 'canary' into middleware-updates
kodiakhq[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Looks like we want to keep this entry and update the path to
/docs/advanced-features/middleware.md
to go along with the redirect. This should resolve the failing check here https://github.com/vercel/next.js/runs/5888873149?check_suite_focus=true#step:4:5There 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.
@ijjk Ahh, thank you! I was getting a little confused around how redirects work for these docs. So I understand for the future when we want to move something:
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.
So for non-redirect paths it should have the
.md
extension and points to a file in the docs folder, this is what the lint step is mainly checking for to ensure we don't forget to add manifest entries or have typos.For redirect paths it doesn't need to have
.md
as it's matching the path directly without checking the filesystem and the lint step doesn't check these. The destination for the redirect can be any url so if we need to move docs to another site we can e.g.https://vercel.com/docs/some/path
but in this case it can just be/docs/advanced-features/middleware
since it's the same site.Seems like it would be good to add this to our contributing, I'll create a PR with notes on this and request your review.
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.
Opened PR with the above info here #36020
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.
@ijjk Thank you so much for taking the time to explain this. The added example in the contributing doc was super helpful!