Commit graph

330 commits

Author SHA1 Message Date
Maedah Batool
f7ac942e6a
Add note about NEXT_DATA hydration (#37480)
Missing documentation around `NEXT_DATA` hydration when using `getServerSideProps()`. This PR warn users that the result of `getServerSideProps()/getStaticProps` is also available on the client-side due to React Hydration so they should not use any sensitive information in the props.



## Bug

- [x] Related issues linked using [fixes number](https://github.com/vercel/documentation/issues/418)
- [ ] 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 `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-06-06 21:46:38 +00:00
Lee Robinson
741626559d
Improve next/dynamic docs and add links to layouts RFC. (#37244)
- Updates `next/dynamic` docs to teach Suspense first
- Adds links to Layouts RFC in layouts/pages docs
- Clarifies and simplifies streaming docs

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-29 23:48:41 +00:00
Ryan
f4dcb81d61
[docs] Clarify "When does getStaticProps run" note (#37289)
Changed bullet points to say "getStaticPaths" instead of "getStaticProps".

Fixes https://github.com/vercel/next.js/issues/37288 

## Feature

- [x] Related issues linked using `fixes #number`
- [x] Documentation added

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-05-29 22:17:29 +00:00
Steven
57dcc9d329
Update pnpm create next-app for latest pnpm 6 and 7 (#37254)
This command changed in pnpm [6.32.13](https://github.com/pnpm/pnpm/releases/tag/v6.32.13) and [7.1.1](https://github.com/pnpm/pnpm/releases/tag/v7.1.1) so lets update it since its been a few weeks and we can expect pnpm users to update more regularly than npm users.

- Fixes https://github.com/vercel/next.js/pull/37240 
- Fixes https://github.com/vercel/next.js/pull/37045
- Fixes https://github.com/vercel/next.js/pull/37032
- Fixes https://github.com/vercel/next.js/pull/36602
- Fixes https://github.com/vercel/next.js/pull/36496
2022-05-27 21:21:40 +00:00
Naing
6736041d51
Update incremental-static-regeneration.md (#37159)
I couldn't understand well this sentence at the first time of reading as a non native english speaker. I think 'that' is needed here.



## 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-05-24 14:27:17 +00:00
Sharath Challa
11ad65e445
Add eslint rule for not allowing styled-jsx in _document.js (#32678)
## Bug

- [ ] Related issues linked
fixes #32656



Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-23 02:32:13 +00:00
Jim Fisher
82fb4b408f
Clarify conditions under which process.env expressions are inlined (#33212)
## Documentation / Examples

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


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-22 23:00:13 +00:00
Balázs Orbán
2e1740bb69
docs: clarify environment variables behavior (#36620)
Based on https://github.com/vercel/next.js/issues/36551#issuecomment-1113457752 making the docs more clear which also aligns with the wording of Environment Variables in Middlerware: https://nextjs.org/docs/api-reference/next/server#how-do-i-access-environment-variables

See also: https://github.com/vercel/next.js/pull/20869#issuecomment-757799953

## 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: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-22 16:57:55 +00:00
Gaspar Garcia Jr
c72d32d3b5
Clarify .env* environment variable priority (#36967)
Clarify that the environment variables are ordered in descending priority and that the existing system environment is not overridden.

fixes https://github.com/vercel/next.js/issues/36966

## 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: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-17 17:52:41 +00:00
Robert Keyser
66d98e2fc6
scss exects semicolon (#36779)
copy/pasting the SCSS example into VSCode results in linter warning. Fixed with semicolon on variable assignment. Added the second semicolon for consistency.



## Documentation / Examples

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


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-12 16:29:01 +00:00
James Perkins
22c0b65eb5
Fixing Tina + Adding a demo URL (#35480)
## Documentation / Examples

- Updating Tina Demo URL
- Adding Tina to blog-starter example
- Adding Tina to Basic features section
- Updating Tina to actually work again
2022-05-10 17:52:54 +00:00
Steven Tey
3fd1168504
Fixed typo (#36753)
## 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-05-07 20:50:31 +00:00
Steven
da8d1984d2
Add experimental wildcard remotePatterns config for upstream images (#36245)
## Description 
This PR implements a new configuration object in `next.config.js` called `experimental.images.remotePatterns`.

This will eventually deprecate `images.domains` because it covers the same use cases and more by allowing wildcard pattern matching on `hostname` and `pathname` and also allows restricting `protocol` and `port`.

## Feature

- [x] Implements an existing feature request.
- [x] Related issues linked
- [x] Unit tests added
- [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`

## Related 

- Fixes #27925 
- Closes #18429 
- Closes #18632
- Closes #18730
- Closes #27345
2022-05-05 02:19:16 +00:00
Stig Kleppe-Jørgensen
9cda84b484
Improve wording (#36649)
## 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] Improve wording
- [ ] Make sure the linting passes by running `yarn lint`
2022-05-03 21:57:29 +00:00
jpveilleux
0234e6d553
Added type to Page Component for TypeScript (#36608)
* Added type to Page Component for TypeScript

Following this tutorial, I noticed that TS was complaining that "getLayout" did not exist on Page. That is normal since Page is typed as NextPage. I simply exported the new type we create in "_App.tsx" and used it as the return type for Page. This will probably help others seeing that red in their editors and perhaps being confused.

* Small linting change

* Apply suggestions from code review

* Update layouts.md

* lint fix

* update type

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-05-03 15:58:31 -05:00
Lee Robinson
d6cb99b37e
Add docs about SSR caching (yes, you can do this with Next.js) (#36588)
I've heard a lot of folks not realize this is possible 😄 Hopefully this helps.
2022-04-30 16:45:54 +00:00
Houssein Djirdeh
fd2ba11763
Adds inline script functionality to next/script for worker and beforeInteractive strategies (#36364)
Adds inline script functionality to `next/script` for `worker` and `beforeInteractive` strategies. 

- fixes #36318 
- fixes #26343
- fixes #26591
- fixes #26343
- fixes #26240


Co-authored-by: Janicklas Ralph <6142074+janicklas-ralph@users.noreply.github.com>
2022-04-29 15:20:31 +00:00
Mohamed ElSaadany
e4f66fe911
Adds <link rel="preconnect" ... /> to example optimized font output (#36529)
This makes it clear that the font optimization adds these for you.
This avoids duplicate `<link rel="preconnect" />` in the HTML output if the developer is unaware that it is being added automatically.



## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-04-28 00:04:18 +00:00
Lee Robinson
ea0456dc07
Add docs on self-hosted ISR persisting across pods. (#36520)
ISR works self-hosted, but there's some more guidance needed when hosting with container-based setups (e.g. Kubernetes) and how the files are shared between different pods. This was based on community feedback. Please let me know if you'd like to see any additions here! 🙏
2022-04-27 23:38:08 +00:00
Luis Alvarez D
ff140a7291
Update usage paragraph of next/script onLoad (#36453)
Changing the paragraph to not include `beforeInteractive` as one of the possible use cases of `onLoad`.

*Update:* Added docs for `onError` in the API reference of `next/script`.

@housseindjirdeh does `onError` also has the same limitation or is this only for `onLoad`?

Closes https://github.com/vercel/next.js/issues/33402

## 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-04-25 17:51:35 +00:00
JJ Kasper
e832007536
Revert "Change getStaticProps to getStaticPaths in getStaticPaths docs" (#36425)
This change was un-necessary and `getStaticProps` was correct here so this reverts the change. 

Reverts vercel/next.js#36403
2022-04-25 03:33:36 +00:00
youngvform
2a42de2fd1
Change getStaticProps to getStaticPaths in getStaticPaths docs (#36403)
## Overview
The subject is `When does getStaticPaths run` but this docs denotes about `getStaticProps`.
So could you check `getStaticProps` is right?

## Documentation / Examples

- [X] Make sure the linting passes by running `yarn lint`
2022-04-23 14:41:03 +00:00
Maedah Batool
60488e68e3
Fix broken data fetching links in docs (#33766)
* Fix broken links for Data Fetching

* Fix link data fetching doc

* Improve link file paths

* Update errors/large-page-data.md

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

* Update links

* Fix linting

* Lint tests

* Lint tests

Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2022-04-22 14:03:07 +02:00
Janicklas Ralph
0441f816a6
Changes to the beforeInteractive strategy to make it work for streaming (#31936)
Changes to the beforeInteractive strategy to make it work for streaming

Splitting `beforeInteractive` into two strategies `beforeInteractive` at the _document level and `beforePageRender` for page level <Scripts>
2022-04-21 21:15:53 +00:00
David Barker
44c7fd7999
Add onLoad gotcha note to basic-features doc (#36261)
#33097 adds a note to the `Script` documentation explaining that `onLoad` cannot be used with the `beforeInteractive` strategy. However, this note was missing in the [Basic Features](https://nextjs.org/docs/basic-features/script) documentation, causing some confusion. This adds the note there too.

This will hopefully fix a lot of confusion noted in https://github.com/vercel/next.js/issues/33191.
2022-04-19 11:50:19 +00:00
Eric Burel
e69820accc
Loosen the "public" condition on getSSP (#36018)
<!--
Thanks for opening a PR! Your contribution is much appreciated.
In order to make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below.
Choose the right checklist for the change that you're making:
--

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
** I've made the change via GitHub UI sorry :)**

Hi, 

I think the "data must be public" condition on getSSP is not really true, and even counter-productive. Being able to statically render more content is most probably positive, in terms of perceived and real performance of the app + energy consumption. It's actually totally possible, and not even that hard thanks to middleware, to statically render custom, paid, segment-specific content (and even individual-specific content under certain conditions).

I've documented the reason for this change in a few places if you want more details:
- related PR on React: https://github.com/reactjs/reactjs.org/pull/4566
- demo implementation and explanation on how to couple middlewares and getSSP to statically render any kind of content (including custom content): https://blog.vulcanjs.org/render-anything-statically-with-next-js-and-the-megaparam-4039e66ffde
2022-04-15 13:23:32 +00:00
Francis Gulotta
5feb400aff
docs: clarify when you use getServerSideProps (#35922)
Removed the misleading TTFB information. It was easy to read that incorrectly and while getStaticProps does have a better TTFB that's not why you might need to avoid getServerSideProps, I gave better examples. 

I also wanted to answer "well how do I cache `getServerSideProps`?" and now there's a link.

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-04-07 22:00:28 +00:00
Steven
9f9214abe5
Updated create-next-app docs to include pnpm usage (#35755)
This PR updates the docs and examples for `create-next-app` to include pnpm usage.

The following script was used to update every example README:

```js
const fs = require('fs')
const examples = fs.readdirSync('./examples')

for (let example of examples) {
    const filename = `./examples/${example}/README.md`
    const markdown = fs.readFileSync(filename, 'utf8')
    const regex = new RegExp(`^yarn create next-app --example (.*)$`, 'gm')
    const output = markdown.replace(regex, (yarn, group) => {
        const pnpm = `pnpm create next-app -- --example ${group}`
        return `${yarn}\n# or\n${pnpm}`
    })
    fs.writeFileSync(filename, output)
}
```
2022-03-30 21:03:21 +00:00
VFLC
ced2040661
docs: fix typo in Script Component docs (#35731)
Added missing closing double quote : `strategy="worker` -> `strategy="worker"`



## 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-03-30 13:42:36 +00:00
hiro
f16ee05f59
Fix typo in docs (#35561)
The following files have been modified.

- `docs/api-reference/next.config.js/rewrites.md`
- `docs/basic-features/script.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-03-24 01:02:40 +00:00
Thiago M
cd47984152
clarify use of Script (#35491)
Leave more clear that <Script> component can't be used inside Head. Current it says "without need", which don't implies it can't be used.



## 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-03-21 17:06:04 +00:00
Nelo
40a5c94ca7
Fix typo in getServerSideProps doc page (#35467)
While reading the documentation, I noticed that this paragraph was not correctly written and was hard to read. I fixed it adding a dot.

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
2022-03-21 14:24:19 +00:00
Steven
bc460229ab
Update next/image docs for width & height (#35188)
- Fixes #30219 

Co-authored-by: Rich Haines <hello@richardhaines.dev>
2022-03-17 15:16:15 -04:00
Kyle Holmberg
ed1eedaa97
Encourage installation of sass as a devDep (#35323) 2022-03-15 15:42:36 +01:00
Alex Castle
76bad07bdf
Add new 'raw' image layout (#34339)
This PR adds a new layout mode for images called `raw`, as discussed with the core team a while back. This mode has the following characteristics:
 - No wrapper `span` around the `img` element
 - No sizer svg
 - Almost no styles automatically added to the `img` element
 - `style` parameter is allowed and is passed through to the underlying `img` element

This also adds documentation changes to describe the new component.

There are a few tradeoffs and DX decisions that may warrant discussion/revision before merging. I'll add a few comments to highlight those issues.

- Related to #18637
2022-03-14 10:25:23 -04:00
Houssein Djirdeh
79016b879f
Adds web worker support to <Script /> using Partytown (#34244)
## Summary

This PR adds a new `worker` strategy to the `<Script />` component that automatically relocates and executes the script in a web worker.

```jsx
<Script 
  strategy="worker"
  ...
/>
```

[Partytown](https://partytown.builder.io/) is used under the hood to provide this functionality.

## Behavior

- This will land as an experimental feature and will only work behind an opt-in flag in `next.config.js`:

  ```js
  experimental: {
    nextScriptWorkers: true
  }
  ```

- This setup use a similar approach to how ESLint and Typescript is used in Next.js by showing an error to the user to install the dependency locally themselves if they've enabled the experimental `nextScriptWorkers` flag.

  <img width="1068" alt="Screen Shot 2022-03-03 at 2 33 13 PM" src="https://user-images.githubusercontent.com/12476932/156639227-42af5353-a2a6-4126-936e-269112809651.png">
- For Partytown to work, a number of static files must be served directly from the site (see [docs](https://partytown.builder.io/copy-library-files)). In this PR, these files are automatically copied to a `~partytown` directory in `.next/static` during `next build` and `next dev` if the `nextScriptWorkers` flag is set to true.

## Checklist

- [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
- [ ] Telemetry added. In case of a feature if it's used or not.

This PR fixes #31517.
2022-03-11 22:26:46 +00:00
Lee Robinson
175e081e86
Improve TypeScript documentation. (#34690)
- Moves example out of hidden dropdown at the top and features more prominently
- Adds a clone and deploy link for those looking to get started immediately
- Cross-posts ignoring TS errors docs over, because I've personally assumed it should be on this page and then ctrl+f found nothing
- Added version history to the top, based on contents of this file
- Remove custom app caveats from code snippet to improve copy-paste ability
2022-02-28 08:32:27 +00:00
JJ Kasper
0aba3072cc
Fix issues in getStaticPaths docs (#34840) 2022-02-25 20:36:05 -08:00
Kara
b3f2b38844
Remove page-specific font example from docs (#34694)
The Font Optimization docs have an outdated example that recommends
adding fonts via `next/head`. This is an anti-pattern that Next.js
has already warned about through ESLint for a while (see
https://nextjs.org/docs/messages/no-page-custom-font) and is now
starting to warn about through the console because it won't work
well with streaming architecture.

This change removes the outdated example from the docs.
Fixes #34693



## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-02-22 23:17:01 +00:00
Aman Mittal
787186a85a
Add info on rendering an error page when using getServerSideProps (#34488)
This PR adds information on rendering an error page (500 page specifically) when using `getServerSideProps`.

## Bug

- [x] Related issues linked using https://github.com/vercel/documentation/issues/106
- [ ] 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: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-02-17 19:04:08 +00:00
Lee Robinson
69aedbd666
Fix typo (#34480) 2022-02-17 15:18:59 +00:00
Aman Mittal
634926d8df
Add Error Handing section for ISR (#34360)
* Add Error Handing section for ISR

* Apply suggestions from code review

* update check

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-02-15 14:22:15 -06: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
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
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
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
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
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
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