Skip to content

feat: add docs on middleware #795

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

Merged
merged 2 commits into from
Nov 13, 2021
Merged

feat: add docs on middleware #795

merged 2 commits into from
Nov 13, 2021

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Nov 12, 2021

Summary

Adds some docs on using Next 12 middleware on Netlify.

Rendered version

image

Fixes #775

@github-actions github-actions bot added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Nov 12, 2021
@@ -0,0 +1,76 @@
# Using Next 12 middleware on Netlify

Next 12 introduces a new feature called [middleware](https://nextjs.org/docs/middleware), which are functions that are

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Next 12 introduces a new feature called [middleware](https://nextjs.org/docs/middleware), which are functions that are
Next 12 introduces a new feature called [Middleware](https://nextjs.org/docs/middleware), which are functions that are

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MelanieCrissey Would the section title need to change too?

Using Next 12 Middleware on Netlify

Sounds like we're wanting it capitalized when it refers to the feature itself

tiffafoo
tiffafoo previously approved these changes Nov 12, 2021
Copy link

@tiffafoo tiffafoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link

@rstavchansky rstavchansky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some docs-related feedback. Thanks for writing this up!

@@ -0,0 +1,76 @@
# Using Next 12 middleware on Netlify

Next 12 introduces a new feature called [middleware](https://nextjs.org/docs/middleware), which are functions that are

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MelanieCrissey Would the section title need to change too?

Using Next 12 Middleware on Netlify

Sounds like we're wanting it capitalized when it refers to the feature itself

Comment on lines +12 to +14
Next 12 Middleware works out of the box with Netlify, and most functions will work unchanged. See
[the middleware docs](https://nextjs.org/docs/middleware) for details of how to create them. There are however a few
workarounds that are currently required for some features during the beta period:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor edits (assuming these are Netlify functions in the first line)

Suggested change
Next 12 Middleware works out of the box with Netlify, and most functions will work unchanged. See
[the middleware docs](https://nextjs.org/docs/middleware) for details of how to create them. There are however a few
workarounds that are currently required for some features during the beta period:
Next 12 Middleware works out of the box with Netlify, and most Netlify functions will work unchanged. Refer to
[the middleware docs](https://nextjs.org/docs/middleware) for details of how to create middleware functions. There are, however, a few
workarounds that are currently required for some features during the beta period:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, these are middleware functions.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it may be good to specify that - for extreme clarity 😄

Co-authored-by: Rachael Stavchansky <rachael@netlify.com>
@ascorbic ascorbic changed the title feat: add docs on midldeware feat: add docs on middleware Nov 12, 2021
@ascorbic ascorbic merged commit 3b4a8c4 into main Nov 13, 2021
@ascorbic ascorbic deleted the mk/middleware-docs branch November 13, 2021 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write middleware docs
4 participants