Commit graph

879 commits

Author SHA1 Message Date
David Burrows
5402f09920
Update MDX Custom Elements setup (#34175)
The current documentation for MDX Custom Element setup was not clear, ended up on https://github.com/vercel/next.js/issues/30812 before I had this configured correctly, have tried to make the config steps more explicit.




## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-02-14 22:27:36 +00:00
T•Ø•R•Ü•S
c0c11ad937
Few touch-ups to the docs on web forms in Next (#34286)
## Beyond the minor changes...

- Added a warning that back-end validation is more secure
- Fixed a RegEx that I'm damn-near sure is wrong.
- Returned status codes in the first back-end serverless example
- Added a link the user can click on to learn what a HTTP method is

## Changes that must be reviewed:

- Does the `script` tag need explanation? I think all that needs to be said is that you can indeed use it in Next.JS, without much trouble.



## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-02-14 20:21:27 +00:00
Aman Mittal
d9eba570c6
Add an example to Write server-side code directly section (#34319)
In addition to https://github.com/vercel/front/pull/12473, this PR adds an example to the section :Write server-side code directly.


## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
2022-02-14 19:24:31 +00:00
hjaber
8a5e1ceb86
Update missing curly brace in image.md (#34307)
* Update missing curly brace in image.md

Missing curly brace in lazyRoot component code example

* add return

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-02-14 10:37:48 -06:00
Zeno Rocha
7be6359aff
Fix typo on getInitialProps (#34309)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
2022-02-14 04:19:46 +00:00
Lee Robinson
ef31084eb2
Update Middleware docs to add version history. (#34302)
Follow up from https://github.com/vercel/next.js/pull/33410.

Adds version history for Middleware so it's more clear it launched in beta, and that we have a place to track changes.
2022-02-13 22:46:30 +00:00
Hassan El Mghari
069e61d78d
Replace babel with SWC & minor changes in getting started (#34282)
## List of changes made:

- [x] Replaced babel with SWC when talking about compilers & backlinked to the Next.js 12 blog post
- [x] Changed "Setup" heading to "Automatic Setup" to make it more clear
- [x] Changed one of the cards in the "related" section to be consistent with the rest
- [x] Minor grammatical fixes

Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
2022-02-13 03:03:25 +00:00
Lee Robinson
4f5b0621c1
Alphabetize auth docs providers. (#34281)
Follow up from https://github.com/vercel/next.js/pull/33029, to prevent bias in ordering.
2022-02-13 00:51:53 +00:00
Hassan El Mghari
ca8530ffc8
Changed all occurrences of etc to match (#34280)
The [correct](https://www.grammarly.com/blog/et-cetera-etc/) way to use et cetera is to put a period right after and a comma behind it if it's being used as a list. I updated the occurrences in the docs and examples that didn't match these rules.
2022-02-13 00:22:52 +00:00
Hassan El Mghari
d5c815e52f
Update frequently asked questions in documentation (#34252)
This is a rewrite of the FAQ section as it's quite outdated. Thank you to @styfle and @leerob for the suggestions. 

**Here's a list of changes I've made:**
- Removed “How big is it”
- Removed “What syntactic features are compiled? How do I change them?”
- Replaced all occurances of "it" with "Next.js"
- Changed "Is Next.js production ready?" to mention showcase
- Started the answer to each question with either yes or no for yes/no questions
- Listed more pros for router section, changed question name, and backlined to migrating from react router docs
- Revamped "fetching data" answer to list all our data fetching methods and  backlink to docs
- Made "Can I use Next.js with my favorite JavaScript library?" more clear and emphasized the large number of examples we have
- Reorganized questions to make more sense
- Made wording more consistent throughout

**Additional Questions:**
1. Do we want to keep the "What inspired Next.js" section the same? One option could be to only keep the first sentence linking to G's article and not talk about PHP because of its reputation among newer web developers as an old & outdated  technology.
2. What's the advantage of routes always being lazy-loadable? I'd like to add this to the last bullet point of the new router question to make it obvious what the benefit is.

Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
2022-02-12 21:24:33 +00:00
Lee Robinson
a3e18daa1c
Update Preview Mode docs. (#34278)
Follow up to https://github.com/vercel/next.js/pull/34142/files.
2022-02-12 21:17:48 +00:00
JJ Kasper
2351e5b701
Update link for includeFiles glob reference (#34269)
This ensures we reference [minimatch](https://www.npmjs.com/package/minimatch) since the globs there can have different syntax. 

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`

Closes: https://github.com/vercel/next.js/issues/34246
2022-02-12 15:30:20 +00:00
Steven
0a916cf1d9
Update docs for image lazyRoot prop (#34241)
- Related to #32774
2022-02-11 18:37:16 +00:00
JJ Kasper
4643f3c3d7
Ensure /index route is redirected correctly (#34206) 2022-02-10 16:40:48 -06:00
Tim Neutkens
57eec8887d
Update version number in next.config.js API reference 2022-02-10 11:17:05 +01:00
Maedah Batool
b0205c1c11
Re-render details if rewrites are used (#34049)
* Add details about using rewrites

* Update docs/advanced-features/automatic-static-optimization.md

Co-authored-by: JJ Kasper <jj@jjsweb.site>

* link to isReady

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-02-09 20:15:59 -06:00
Maia Teegarden
01ee7e0b22
Chore/stable swc compiler options (#34074)
Mark some previously experimental swc compiler options as stable under a new `compiler` option

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
2022-02-10 01:54:28 +00:00
Matt Oliver
49fbbf4e34
[Docs] add note to clarify use of Link when clearing preview cookies (issue #34129) (#34142)
Add note that explains the need to pass `prefetch={false}` to `Link` component to prevent clearing cookies accidentally
(responding to issue "Docs: potential preview-mode error on production build #34129").

Note as follows:

> **Note:** If calling this route using `Link` component, you must pass in `prefetch={false}` to prevent calling `clearPreviewData` during prefetch.



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ x] Make sure the linting passes by running `yarn lint`
2022-02-09 20:50:35 +00:00
Xavier Haniquaut
2e0598d02b
docs(api-routes): fix node docs links (#34125)
## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-02-09 15:02:53 +00:00
Luis Alvarez D
5235b0fe92
Add note about crawlers and fallback: true (#34114)
Added a mention that `fallback: true` behaves like `fallback: 'blocking'` back into docs. It was originally added in https://github.com/vercel/next.js/pull/29121.

## Feature

- [x] Documentation added

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`


Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
2022-02-09 00:44:47 +00:00
hackerman
1efa892e97
docs: add Ory vercel example to auth page (#33029)
See also the merged https://github.com/vercel/examples/pull/40

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-02-08 21:59:13 +00:00
Tim Neutkens
c74e4f21ff
Add support for async fn / promise in next.config.js/.mjs (#33662)
- Add support for async function / promise export in next.config.js/.mjs
- Update docs

Adds support for https://twitter.com/timneutkens/status/1486075973204422665

But also the simpler version:

```js
module.exports = async () => {
  return {
    basePath: '/docs'
  }
}
```



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [x] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Documentation added

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
2022-02-07 08:48:35 +00:00
Jess Telford
8eb6ddc343
[docs] Add env var load order (#32350)
My team & I keep asking the question "What order are env vars _actually_ loaded in?".

This addition surfaces the order in a clear and readable way without having to read and understand the entire "Environment Variables" documentation first.

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-02-06 21:44:19 +00:00
Aman Mittal
80a153cd41
Update multiple docs pages to follow Docs Content style guide (#33855)
This PR addresses minor docs-related styling issues on the Getting Started, Data Fetching (Get Server Side Props), etc pages. It follows the mechanics of the Docs Content Style guide to maintain consistency across all documentation. 

Also fixes some minor issues such as missing period at the end of a sentence on docs pages like as Data Fetching (getStaticProps).

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-02-06 04:21:35 +00:00
fmacherey
560191ab72
Update custom server docs for async methods (#30521)
as handle() returned from app.getRequestHandler() is a Promise, it has to be handled correctly. Simply returning it, works fine.


## Bug
- [x] Related issues linked using fixes #number
- [x] Integration tests added
- [x] Errors have helpful link attached, see contributing.md

## Feature
- [x] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [x] Related issues linked using fixes #number
- [x] Integration tests added
- [x] Documentation added
- [x] Telemetry added. In case of a feature if it's used or not.
- [x] Errors have helpful link attached, see contributing.md

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-02-06 03:22:02 +00:00
Lance Chen
93fa12921b
Fix redirect url for prefixing the default locale (#33762)
We want to prefix the default locale to the current path (`/path`), not the current href (`http://domain.tld/path`).


## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-02-06 02:36:50 +00:00
Eric Howey
6890e3fcf2
(docs): update i18n-routing.md (#33123)
The recommended code for `_middleware.ts` does not work in prod, but does work locally.  You need to use `request.nextUrl.pathname` to properly redirect from what I can tell.  You also need to have a quick helper function to strip off the `/default` locale at the start of the pathname as we are providing `/en` as a fallback locale.

FWIW - I am pretty new to NextJS.  Someone with more experience should probably review this suggestion before merging it.  What I can tell you however is that the code as it is in `_middleware.ts` works locally but breaks in prod.  To test this out use the code and navigate to `https//www.mysite.com` - it will work as expected on the root url, as this matches `nextUrl.href`.  Now try navigating to `https//www.mysite.com/about` and you will be redirected to `https://www.mysite.com/en/https://www.mysite.com/about`.



## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`

Closes: https://github.com/vercel/next.js/pull/33762

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-02-06 02:17:36 +00:00
ncphi
7309098283
Add async to middleware docs. (#31356)
* Add `async` to middleware docs. 

I was reading the docs and got nervous. It looked like middleware didn't support async/await. After digging into the examples I found out it is possible. 

Not 100% sure if this is the docs change yahs want, but I thought I'd open a PR just incase.

* Add middleware API note

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-02-05 20:01:18 -06:00
Maedah Batool
6814ca7f23
Improve Form Guide Contents (#33913)
We need to make some quick fixes to the Form guide. The PR changes title and meta description.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-02-05 19:08:18 +00:00
MxA
ca8dc8d011
docs: fix variable name from profileData to data in CSR page (#34018)
Since the variable name is called `data`, I believe checking `profileData` will always be `undefined`.

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-02-05 14:57:02 +00:00
Ismael Rumzan
25d93de9fe
Updated going-to-production with loading performance (#33179)
## Documentation Update
Based on this issue: https://github.com/vercel/next.js/issues/29319

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`


Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-02-04 16:30:55 +00:00
Vincent Voyer
632c9860e0
docs(isr): add missing key prop in jsx loop (#33984)
Copy pasting this example with a default create-next-app leads to an eslint warning. So I thought let's fix this.

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-02-04 14:15:56 +00:00
Jordie
834546a74f
Fix typo in new experimental Relay support docs (#33963)
## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-02-03 23:46:07 +00:00
Lee Robinson
5abd92fb56
Update custom document docs to prepare for React 18. (#33814)
To help prepare for React 18, I've found myself sharing the updated code snippet of `_document` linked in the [React 18 docs](https://nextjs.org/docs/advanced-features/react-18#react-server-components), which uses a function instead of a class.

This PR updates the Custom Document docs to help prepare for this change, by encourage readers to use the new version, and listing more tangible examples of why you would override `_document` (`lang` on `html`, className on `body`). It also reorganizes some of the caveats and warnings related to `getInitialProps` usage to only be in the single section that applies to it.

These overrides and ejections (`getInitialProps` and `renderPage`) only apply to a subset of the people looking to change document. 

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-02-03 18:35:22 +00:00
Lee Robinson
bc223d76e0
Update deployment docs to fix oversized image. (#33934)
We made the images expand to fit the full width of the container, but the deploy button image shouldn't be that large. Also made some slight refactors here to improve on my past documentation changes.
2022-02-03 02:30:15 +00:00
Aman Mittal
ee2725f506
Update info on how to process webhooks by disabling bodyParser (#33909)
Explicitly mention disabling `bodyParser` when processing a webhook request. Uses the "webhook" keyword that becomes searchable in the docs for anyone running a search from the sidebar.

It addresses the issue [here](https://github.com/vercel/documentation/issues/71) and [this discussion](https://github.com/vercel/community/discussions/93).

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-02-02 16:33:35 +00:00
yuta-ike
04ca8dbff3
Update MDX document (#33916)
This PR added about `providerImportSource` option, which we need to specify in `next.config.js` to use `MDXProvider`. 


Related mdx documents: https://mdxjs.com/docs/using-mdx/#mdx-provider

> To solve this, a context can be used in React, Preact, and Vue. Context provides a way to pass data through the component tree without having to pass props down manually at every level. Set it up like so:
> 1.  Install either @mdx-js/react, @mdx-js/preact, or @mdx-js/vue, depending on what framework you’re using
> 1. Configure your MDX integration with options.providerImportSource set to that package, so either '@mdx-js/react', '@mdx-js/preact', or '@mdx-js/vue'
> 1. Import MDXProvider from that package. Use it to wrap your top-most MDX content component and pass it your components instead:

Because my English skills are not high, feel free to improve my sentences.

## Bug
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`


Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
2022-02-02 15:27:58 +00:00
Jack Hanford
d432032bbf
Correct pluralization in newly added Relay documentation (#33880)
* Correct pluralization

* Apply suggestions from code review

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-02-01 16:03:16 -06:00
JJ Kasper
3e60c232a8
Relay Support in Rust Compiler (#33702)
Reverts vercel/next.js#33699

This re-opens the support for relay in swc, although we need to narrow in the causes for the build failures in https://github.com/vercel/next.js/runs/4950448889?check_suite_focus=true

Co-authored-by: Andrey Lunyov <102968+alunyov@users.noreply.github.com>
2022-02-01 18:18:55 +00:00
Maedah Batool
af0d082c49
Add Clarity About Downloading and Self-Hosting a Font File (#33760)
Details about downloading and self-hosting font files were missing from our[ Font Optimization docs](https://nextjs.org/docs/basic-features/font-optimization). This PR addresses these changes.

## Bug

- [x] Related issues linked using #33054

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-02-01 17:45:39 +00:00
Maedah Batool
791c356e36
Building web forms with Next.js and Vercel (#32525)
* First commit

* Test Commit

* First draft

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update intro.

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Improve docs in part 5

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Fix Form function in JSX

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update guide contents

* Add different cloud computing companies

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Add details about JavaScript validation

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Improve code for validation without JS

* Improve regex docs

* Add regular expression example

* Explain regex example

* Add regex image

* Add demo videos

* Improve small fixes

* Fix images

* Fix images

* Improve scripts

* Improve scripts

* Add links to example repo

* Test cloudinary images

* Test cloudinary images

* Add resized images

* Test videos

* Remove images folder

* test video

* Fix link

* New video component

* Add images in readme

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Add mdx frontmatter details

* Remove videos from guide

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update docs/guides/building-forms.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Fix typo for Name

* Fix code changes

* Improve docs

* Improve conclusion

* Improve code syntax

* Add lint tests

* Fix yarn language test

Co-authored-by: Rich Haines <hello@richardhaines.dev>
2022-02-01 15:11:03 +01:00
Aman Mittal
ad79c04d6b
Update Content-Security-Policy header usage explanation (#33833)
This PR improves the Content-Security-Policy header usage explanation in the `next.config.js` file.



## Bug

- [x] Related issues linked using fixes #33598 
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-01-31 20:30:47 +00:00
Delba de Oliveira
030666b5bf
[Docs] Testing docs: Comment out optional config that points to a file (#33827)
## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`

This prevents users who copy and paste the options without creating the associated file from experiencing an error. The option is explained in the Jest Docs and in the `Optional: Extend Jest with custom matchers` section.
2022-01-31 14:49:42 +00:00
Emrin
b72eeae202
[docs] Mention SWC in TypeScript documentation. (#33801)
Update outdated TS/TSX compiler information in the documentation.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`


Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
2022-01-30 17:30:02 +00:00
Rich Haines
138361208c
Fixed duplicate data fetching overview page + links (#33774)
This PR removes the duplicate overview link for data fetching, and fixes the corresponding links

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`


Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-01-29 02:52:40 +00:00
JJ Kasper
5ebc6d064f
Move custom server note from middleware doc (#33744)
This moves the note about custom server handling for middleware to the custom server document. 

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`

x-ref: https://github.com/vercel/next.js/pull/33535#discussion_r790110427
2022-01-27 22:58:01 +00:00
Nelson Frank
c2b6d235f2
Correct misspelling in testing documentation #33754 (#33755)
```diff
- Styleheets and images ....

+ Styleheets and images ....
```
closes #33754



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
2022-01-27 22:12:55 +00:00
Rich Haines
8a1c947df1
Changed data fetching file name to overview to fix meta data title (#33232)
* Changed data fetching file name to overview to fix meta data title

* Update docs/api-reference/data-fetching/get-server-side-props.md

Co-authored-by: Steven <steven@ceriously.com>

* Update manifest and check

Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-01-27 09:14:14 -06:00
Vienio99
a0275f2750
Update Time to First Byte (TTFB) link (#33715)
The initial link was showing 404 not found



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
2022-01-26 22:49:30 +00:00
MJ
c385d1b8c4
REMOVE: duplicate key in docs/testing.md (#33681)
There is a duplicate key, `testEnvironment` in one of the examples that are located in docs/testing.md.
In my humble opinion, It is not good to have an error in examples.
My suggestion is we have only one key and it is up to developers what options they have for the `testEnvironment`.

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-01-26 17:41:19 +00:00