Skip to content
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

Add example notion #1

Merged
merged 90 commits into from
Jul 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
ff801fb
[WIP] Add cms notion integration example - index page
leimonio Jun 6, 2021
b0da0c8
Add cover images for pages
leimonio Jun 6, 2021
fe53468
Add post page
leimonio Jun 10, 2021
5f1e5d3
Remove preview functionality
leimonio Jun 10, 2021
be655c1
Merge branch 'master' of github.com:vercel/next.js into add-example-n…
leimonio Jun 21, 2021
8f83e87
Merge branch 'canary' into add-example-notion
leimonio Jun 21, 2021
fc67fc7
Add module.exports to security headers documentation (#26466)
samrobbins85 Jun 22, 2021
fb5fb7f
fix: ignore invalid accept-language header (#26476)
huozhi Jun 22, 2021
005a6e4
chore: Add Alex to lint documentation (#26354)
petermekhaeil Jun 22, 2021
27d78a5
Fix domain locales not available on client (#26083)
RobVermeer Jun 22, 2021
917a9ac
Update to only add image import types when enabled (#26485)
ijjk Jun 22, 2021
c9119f8
Update i18n fields in docs (#26492)
ijjk Jun 22, 2021
9fefd3c
v11.0.1-canary.7
ijjk Jun 22, 2021
c3d4b4b
Merge branch 'canary' of github.com:vercel/next.js into add-example-n…
leimonio Jun 22, 2021
755a1b4
Strongly type `Router.events.on` and `Router.events.off` (#26456)
flybayer Jun 22, 2021
ee1d56d
Update next Link & Image components
leimonio Jun 22, 2021
84a99c5
Ensure image-types file is included (#26495)
ijjk Jun 22, 2021
23df20a
Update react & react-dom to v17
leimonio Jun 22, 2021
8b6e38e
Update tailwind to use jit
leimonio Jun 22, 2021
30ee9e7
v11.0.1-canary.8
ijjk Jun 22, 2021
e969d22
v11.0.1
ijjk Jun 22, 2021
325b3a9
Don't test image domains in test env (#26502)
atcastle Jun 22, 2021
cb95c59
docs: updated minimum Node.js version (#26528)
vitalybaev Jun 23, 2021
1dd9c4b
Update next-env note in docs (#26536)
ijjk Jun 23, 2021
f6e5a81
[examples] Fix ssr-caching example. (#26540)
leerob Jun 23, 2021
be62f02
Fix props not updating when changing the locale and keeping hash (#26…
destruc7i0n Jun 23, 2021
1012630
Add note about adding additional types (#26545)
ijjk Jun 23, 2021
1c996d7
Allow user to override next-image-loader (#26548)
styfle Jun 23, 2021
ccf189f
v11.0.2-canary.0
ijjk Jun 24, 2021
94d7450
chore: Enable Alex documentation linting for error pages (#26526)
petermekhaeil Jun 24, 2021
2c36242
Update SWR example to include fetcher function. (#26520)
phocks Jun 24, 2021
0b79b6d
tailwind examps upgraded to v2.2 (#26549)
pranavp10 Jun 24, 2021
650ebed
doc: prettify docs for next script (#26572)
huozhi Jun 24, 2021
77895fd
Add logging when a custom babelrc is loaded (#26570)
timneutkens Jun 24, 2021
3cd4f34
Add comment to not edit in next-env file (#26573)
ijjk Jun 24, 2021
18a333e
Separate node polyfill test from basic suite (#26550)
ijjk Jun 24, 2021
bbedbb7
fix with-loading example for next 11 (#26569)
johnrackles Jun 24, 2021
4da94a3
v11.0.2-canary.1
timneutkens Jun 25, 2021
634de3c
Add trace url on bootup (#26594)
timneutkens Jun 25, 2021
2f03bfa
v11.0.2-canary.2
timneutkens Jun 25, 2021
170dc0d
Add check for ObjectExpression when iterating on <link> tags for font…
timneutkens Jun 25, 2021
22d1771
Enable Alex documentation linting for docs (#26598)
petermekhaeil Jun 25, 2021
6f42096
Add link to live demo already hosted (#25718)
Vadorequest Jun 25, 2021
e8a9bd1
Update next/image docs for relative parent with layout=fill. (#26615)
leerob Jun 25, 2021
ae0dbe5
Fix GSP redirect cache error (#26627)
ijjk Jun 28, 2021
c2f0653
Correct statusCode when visiting _error directly (#26610)
ijjk Jun 28, 2021
c5751fa
fix: next dynamic with jest (#26614)
huozhi Jun 28, 2021
5b2c845
Ensure API routes are not available under the locale (#26629)
ijjk Jun 28, 2021
d11589d
v11.0.2-canary.3
ijjk Jun 28, 2021
eabecf3
Fix image content type octet stream 400 (#26705)
styfle Jun 28, 2021
1dd6eeb
Update layouts example to persist state across client-side transition…
leerob Jun 29, 2021
956bc2f
Fix typo on "occured" to "occurred" (#26709)
hiro0218 Jun 29, 2021
15afd97
[ESLint] Adds --max-warnings flag to `next lint` (#26697)
housseindjirdeh Jun 29, 2021
46a85b4
update with-redux-toolkit-typescript (#26714)
sohamsshah Jun 29, 2021
9ab916a
Simplify `next-dev-server` implementation (#26230)
devknoll Jun 29, 2021
bb42c86
Update PR labeler action
timneutkens Jun 30, 2021
f5958fd
Simplify stats action (#26751)
timneutkens Jun 30, 2021
136b754
Move code shared between server/client to "shared" folder (#26734)
timneutkens Jun 30, 2021
5b9ad8d
Move next-server directory files to server directory (#26756)
timneutkens Jun 30, 2021
ddc0e79
Support new hydrate API in latest react 18 alpha release (#26664)
huozhi Jun 30, 2021
b046a05
Disable build-output size specific tests (#26769)
ijjk Jun 30, 2021
2373320
Add upstream `max-age` to optimized image (#26739)
styfle Jun 30, 2021
551b614
Fix blurred image position when using objectPosition (#26590)
schoenwaldnils Jun 30, 2021
010a31c
Update azure tests (#26779)
ijjk Jun 30, 2021
be60ef5
Stabilize relay-analytics test (#26782)
ijjk Jun 30, 2021
c515982
Leverage blocked page for _error (#26748)
huozhi Jul 1, 2021
72318a7
Update codeowners to add new maintainers (#26770)
ijjk Jul 1, 2021
b508d90
examples: fix typo `lunix` → `linux` (#26796)
kasipavankumar Jul 1, 2021
612889d
Update repo scripts to separate folder (#26787)
ijjk Jul 1, 2021
e89b8e4
fix: detect loop in client error page (#26567)
huozhi Jul 1, 2021
3c994ab
Update snapshot for font-optimization test (#26823)
ijjk Jul 1, 2021
93f6254
Add `onLoadingComplete()` prop to Image component (#26824)
styfle Jul 1, 2021
d670198
Add "Vary: Accept" header to /_next/image responses (#26788)
jviide Jul 1, 2021
748b005
Fix using-preact example deps (#26821)
sedlukha Jul 1, 2021
0562cc7
Add additional tests for image type detection (#26832)
styfle Jul 1, 2021
03b6177
Fix immutable header for image with static import & unoptimized (#26836)
styfle Jul 1, 2021
acd0fab
Update `publish-canary` script to include checkout (#26840)
styfle Jul 1, 2021
138b9dd
v11.0.2-canary.4
ijjk Jul 1, 2021
270487d
Make sure 404 pages do not get cached by a CDN when using next start …
timneutkens Jul 2, 2021
9039afe
Update to environment-variable.md (#26863)
PaulvdDool Jul 2, 2021
2770619
Don't emit duplicate image files (#26843)
atcastle Jul 2, 2021
59c742e
Add instructions on how to add nextjs.org/docs/messages urls (#26865)
timneutkens Jul 2, 2021
8d920ed
Merge branch 'canary' of github.com:vercel/next.js into add-example-n…
leimonio Jul 2, 2021
b595870
Rename example folder to with-notion
leimonio Jul 2, 2021
abf3418
Update references of example
leimonio Jul 2, 2021
c139f25
Reorder docs manifest and rename to Script Optimization. (#26874)
leerob Jul 2, 2021
bdd1d85
Fix typo on "occured" to "occurred" (#26876)
hiro0218 Jul 2, 2021
7a47b1c
Update README
leimonio Jul 2, 2021
bd6370d
Merge branch 'add-example-notion' of github.com:leimonio/next.js into…
leimonio Jul 2, 2021
7aeb20f
Merge branch 'canary' of github.com:vercel/next.js into add-example-n…
leimonio Jul 2, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .alexignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CODE_OF_CONDUCT.md
examples/
21 changes: 21 additions & 0 deletions .alexrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"allow": [
"attacks",
"color",
"dead",
"execute",
"executed",
"executes",
"execution",
"executions",
"failed",
"failure",
"failures",
"fire",
"fires",
"hook",
"hooks",
"host-hostess",
"invalid"
]
}
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Learn how to add code owners here:
# https://help.github.com/en/articles/about-code-owners

* @timneutkens @ijjk @lfades @divmain @shuding
/docs/ @timneutkens @ijjk @lfades @divmain @shuding @leerob
/examples/ @timneutkens @ijjk @lfades @divmain @shuding @leerob
* @timneutkens @ijjk @shuding @styfle @huozhi @padmaia
/docs/ @timneutkens @ijjk @shuding @styfle @huozhi @padmaia @leerob @lfades
/examples/ @timneutkens @ijjk @shuding @styfle @huozhi @padmaia @leerob @lfades
11 changes: 10 additions & 1 deletion .github/labeler.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,22 @@
"packages/react-refresh-utils/**",
"packages/next-codemod/**"
],
"type: chrome": [
"created-by: Chrome Aurora": [
{ "type": "user", "pattern": "spanicker" },
{ "type": "user", "pattern": "housseindjirdeh" },
{ "type": "user", "pattern": "devknoll" },
{ "type": "user", "pattern": "janicklas-ralph" },
{ "type": "user", "pattern": "atcastle" },
{ "type": "user", "pattern": "Joonpark13" }
],
"created-by: Next.js team": [
{ "type": "user", "pattern": "ijjk" },
{ "type": "user", "pattern": "padmaia" },
{ "type": "user", "pattern": "huozhi" },
{ "type": "user", "pattern": "shuding" },
{ "type": "user", "pattern": "sokra" },
{ "type": "user", "pattern": "styfle" },
{ "type": "user", "pattern": "timneutkens" }
]
}
}
2 changes: 2 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Choose the right checklist for the change that you're making:

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

## Feature

Expand All @@ -16,6 +17,7 @@ Choose the right checklist for the change that you're making:
- [ ] 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

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build_test_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
with:
path: ./*
key: ${{ github.sha }}
- run: ./check-pre-compiled.sh
- run: ./scripts/check-pre-compiled.sh
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

testUnit:
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
path: ./*
key: ${{ github.sha }}

- run: bash ./test-pnp.sh
- run: bash ./scripts/test-pnp.sh
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

testsPass:
Expand Down Expand Up @@ -251,7 +251,7 @@ jobs:
path: ./*
key: ${{ github.sha }}

- run: ./publish-release.sh
- run: ./scripts/publish-release.sh

prStats:
name: Release Stats
Expand All @@ -263,7 +263,7 @@ jobs:
with:
path: ./*
key: ${{ github.sha }}
- run: ./release-stats.sh
- run: ./scripts/release-stats.sh
- uses: ./.github/actions/next-stats-action
env:
PR_STATS_COMMENT_TOKEN: ${{ secrets.PR_STATS_COMMENT_TOKEN }}
67 changes: 34 additions & 33 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,36 +111,37 @@ stages:
- script: |
node run-tests.js -g 1/1 --timings --azure --type unit
displayName: 'Run tests'

- job: test_chrome_integration
pool:
vmImage: 'windows-2019'
strategy:
matrix:
nodejs-1:
group: 1/4
nodejs-2:
group: 2/4
nodejs-3:
group: 3/4
nodejs-4:
group: 4/4
steps:
- checkout: none
- script: |
wmic datafile where name="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" get Version /value
displayName: 'List Chrome version'
- task: NodeTool@0
inputs:
versionSpec: $(node_version)
displayName: 'Install Node.js'
- task: Cache@2
inputs:
# use deterministic cache key that is specific
# to this test run
key: $(Build.SourceVersion)
path: $(System.DefaultWorkingDirectory)
displayName: Cache Build
- script: |
node run-tests.js -g $(group) --timings --azure
displayName: 'Run tests'
# TODO: investigate re-enabling when stability matches running in
# tests in ubuntu environment
# - job: test_chrome_integration
# pool:
# vmImage: 'windows-2019'
# strategy:
# matrix:
# nodejs-1:
# group: 1/4
# nodejs-2:
# group: 2/4
# nodejs-3:
# group: 3/4
# nodejs-4:
# group: 4/4
# steps:
# - checkout: none
# - script: |
# wmic datafile where name="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" get Version /value
# displayName: 'List Chrome version'
# - task: NodeTool@0
# inputs:
# versionSpec: $(node_version)
# displayName: 'Install Node.js'
# - task: Cache@2
# inputs:
# # use deterministic cache key that is specific
# # to this test run
# key: $(Build.SourceVersion)
# path: $(System.DefaultWorkingDirectory)
# displayName: Cache Build
# - script: |
# node run-tests.js -g $(group) --timings --azure
# displayName: 'Run tests'
20 changes: 19 additions & 1 deletion contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@ Read about our [Commitment to Open Source](https://vercel.com/oss).

To contribute to [our examples](examples), take a look at the [“Adding examples” section](#adding-examples).

## Adding warning/error descriptions

In Next.js we have a system to add helpful links to warnings and errors.

This allows for the logged message to be short while giving a broader description and instructions on how to solve the warning/error.

In general all warnings and errors added should have these links attached.

Below are the steps to add a new link:

- Create a new markdown file under the `errors` directory based on `errors/template.md`: `cp errors/template.md errors/<error-file-name>.md`
- Add the newly added file to `errors/manifest.json`
- Add the following url to your warning/error: `https://nextjs.org/docs/messages/<file-path-without-dotmd>`. For example to link to `errors/api-routes-static-export.md` you use the url: `https://nextjs.org/docs/messages/api-routes-static-export`

## To run tests

Make sure you have `chromedriver` installed for your Chrome version. You can install it with
Expand Down Expand Up @@ -46,7 +60,7 @@ Running a specific test suite inside of the `test/integration` directory:
yarn testonly --testPathPattern "production"
```

Running just one test in the `production` test suite:
Running one test in the `production` test suite:

```sh
yarn testonly --testPathPattern "production" -t "should allow etag header support"
Expand Down Expand Up @@ -155,3 +169,7 @@ yarn create next-app --example DIRECTORY_NAME DIRECTORY_NAME-app

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
````

## Publishing

Repository maintainers can use `yarn publish-canary` to publish a new version of all packages to npm.
2 changes: 1 addition & 1 deletion docs/advanced-features/codemods.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export default withRouter(
)
```

This is just one case. All the cases that are transformed (and tested) can be found in the [`__testfixtures__` directory](https://github.com/vercel/next.js/tree/canary/packages/next-codemod/transforms/__testfixtures__/url-to-withrouter).
This is one case. All the cases that are transformed (and tested) can be found in the [`__testfixtures__` directory](https://github.com/vercel/next.js/tree/canary/packages/next-codemod/transforms/__testfixtures__/url-to-withrouter).

#### Usage

Expand Down
2 changes: 1 addition & 1 deletion docs/advanced-features/custom-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The `Component` prop is the active `page`, so whenever you navigate between rout

### Caveats

- If your app is running and you just added a custom `App`, you'll need to restart the development server. Only required if `pages/_app.js` didn't exist before.
- If your app is running and you added a custom `App`, you'll need to restart the development server. Only required if `pages/_app.js` didn't exist before.
- Adding a custom `getInitialProps` in your `App` will disable [Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md) in pages without [Static Generation](/docs/basic-features/data-fetching.md#getstaticprops-static-generation).
- When you add `getInitialProps` in your custom app, you must `import App from "next/app"`, call `App.getInitialProps(appContext)` inside `getInitialProps` and merge the returned object into the return value.
- `App` currently does not support Next.js [Data Fetching methods](/docs/basic-features/data-fetching.md) like [`getStaticProps`](/docs/basic-features/data-fetching.md#getstaticprops-static-generation) or [`getServerSideProps`](/docs/basic-features/data-fetching.md#getserversideprops-server-side-rendering).
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced-features/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Now hit <kdb>F5</kbd> or select **Debug: Start Debugging** from the Command Pale

Now you can use the [`debugger`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) statement to pause your backend or frontend code anytime you want to observe and debug your code more precisely.

If you trigger the underlying code by refreshing the current page, clicking on a page link or fetching an API route, your code will be paused and the debugger window will pop up.
If you trigger the underlying code by refreshing the current page, clicking on a page link or fetching an API route, your code will be paused and the debugger window will appear.

To learn more on how to use a JavaScript debugger, take a look at the following documentation:

Expand Down
2 changes: 1 addition & 1 deletion docs/advanced-features/dynamic-import.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function Page() {

You can think of dynamic imports as another way to split your code into manageable chunks.

React components can also be imported using dynamic imports, but in this case we use it in conjunction with `next/dynamic` to make sure it works just like any other React Component. Check out the sections below for more details on how it works.
React components can also be imported using dynamic imports, but in this case we use it in conjunction with `next/dynamic` to make sure it works like any other React Component. Check out the sections below for more details on how it works.

## Basic usage

Expand Down
3 changes: 3 additions & 0 deletions docs/advanced-features/i18n-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ module.exports = {
{
domain: 'example.fr',
defaultLocale: 'fr',
// an optional http field can also be used to test
// locale domains locally with http instead of https
http: true,
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced-features/multi-zones.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ With multi zones support, you can merge both these apps into a single one allowi

## How to define a zone

There are no special zones related APIs. You only need to do following:
There are no zone related APIs. You only need to do following:

- Make sure to keep only the pages you need in your app, meaning that an app can't have pages from another app, if app `A` has `/blog` then app `B` shouldn't have it too.
- Make sure to configure a [basePath](/docs/api-reference/next.config.js/basepath.md) to avoid conflicts with pages and static files.
Expand Down
22 changes: 12 additions & 10 deletions docs/advanced-features/security-headers.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@ To improve the security of your application, you can use [`headers`](/docs/api-r

// You can choose which headers to add to the list
// after learning more below.
const securityHeaders = [];

async headers() {
return [
{
// Apply these headers to all routes in your application.
source: '/(.*)',
headers: securityHeaders
}
]
const securityHeaders = []

module.exports = {
async headers() {
return [
{
// Apply these headers to all routes in your application.
source: '/(.*)',
headers: securityHeaders,
},
]
},
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/advanced-features/static-html-export.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The exported app supports almost every feature of Next.js, including dynamic rou

`next export` works by prerendering all pages to HTML. For [dynamic routes](/docs/routing/dynamic-routes.md), your page can export a [`getStaticPaths`](/docs/basic-features/data-fetching.md#getstaticpaths-static-generation) function to let the exporter know which HTML pages to generate for that route.

> `next export` is intended for scenarios where **none** of your pages have server-side or incremental data requirements (though statically-rendered pages can still [fetch data on the client side](/docs/basic-features/data-fetching.md#fetching-data-on-the-client-side) just fine).
> `next export` is intended for scenarios where **none** of your pages have server-side or incremental data requirements (though statically-rendered pages can still [fetch data on the client side](/docs/basic-features/data-fetching.md#fetching-data-on-the-client-side)).
>
> If you're looking to make a hybrid site where only _some_ pages are prerendered to static HTML, Next.js already does that automatically for you! Read up on [Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md) for details.
>
Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ NODE_OPTIONS='--inspect' next
- **Size** – The number of assets downloaded when navigating to the page client-side. The size for each route only includes its dependencies.
- **First Load JS** – The number of assets downloaded when visiting the page from the server. The amount of JS shared by all is shown as a separate metric.

The first load is colored green, yellow, or red. Aim for green for performant applications.
The first load is indicated by green, yellow, or red. Aim for green for performant applications.

You can enable production profiling for React with the `--profile` flag in `next build`. This requires [Next.js 9.5](https://nextjs.org/blog/next-9-5):

Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/create-next-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Create Next.js apps in one command with create-next-app.

# Create Next App

The easiest way to get started with Next.js is by using `create-next-app`. This simple CLI tool enables you to quickly start building a new Next.js application, with everything set up for you. You can create a new app using the default Next.js template, or by using one of the [official Next.js examples](https://github.com/vercel/next.js/tree/canary/examples). To get started, use the following command:
The easiest way to get started with Next.js is by using `create-next-app`. This CLI tool enables you to quickly start building a new Next.js application, with everything set up for you. You can create a new app using the default Next.js template, or by using one of the [official Next.js examples](https://github.com/vercel/next.js/tree/canary/examples). To get started, use the following command:

```bash
npx create-next-app
Expand Down
4 changes: 2 additions & 2 deletions docs/api-reference/next.config.js/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = (phase, { defaultConfig }) => {
}
```

`phase` is the current context in which the configuration is loaded. You can see the [available phases](https://github.com/vercel/next.js/blob/canary/packages/next/next-server/lib/constants.ts#L1-L4). Phases can be imported from `next/constants`:
`phase` is the current context in which the configuration is loaded. You can see the [available phases](https://github.com/vercel/next.js/blob/canary/packages/next/shared/lib/constants.ts#L1-L4). Phases can be imported from `next/constants`:

```js
const { PHASE_DEVELOPMENT_SERVER } = require('next/constants')
Expand All @@ -44,7 +44,7 @@ module.exports = (phase, { defaultConfig }) => {
}
```

The commented lines are the place where you can put the configs allowed by `next.config.js`, which are [defined in this file](https://github.com/vercel/next.js/blob/canary/packages/next/next-server/server/config-shared.ts#L68).
The commented lines are the place where you can put the configs allowed by `next.config.js`, which are [defined in this file](https://github.com/vercel/next.js/blob/canary/packages/next/server/config-shared.ts#L68).

However, none of the configs are required, and it's not necessary to understand what each config does. Instead, search for the features you need to enable or modify in this section and they will show you what to do.

Expand Down
7 changes: 6 additions & 1 deletion docs/api-reference/next/image.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ When `responsive`, the image will scale the dimensions down for smaller
viewports and scale up for larger viewports.

When `fill`, the image will stretch both width and height to the dimensions of
the parent element, usually paired with the [`objectFit`](#objectFit) property.
the parent element, provided the parent element is relative. This is usually paired with the [`objectFit`](#objectFit) property.

Try it out:

Expand Down Expand Up @@ -195,6 +195,10 @@ The image position when using `layout="fill"`.

[Learn more](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position)

### onLoadingComplete

A callback function that is invoked once the image is completely loaded and the placeholder has been removed.

### loading

> **Attention**: This property is only meant for advanced usage. Switching an
Expand Down Expand Up @@ -242,6 +246,7 @@ Other properties on the `<Image />` component will be passed to the underlying
- `srcSet`. Use
[Device Sizes](/docs/basic-features/image-optimization.md#device-sizes)
instead.
- `ref`. Use [`onLoadingComplete`](#onloadingcomplete) instead.
- `decoding`. It is always `"async"`.

## Related
Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/next/link.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default Home

## If the route has dynamic segments

There is nothing special to do when linking to a [dynamic route](/docs/routing/dynamic-routes.md), including [catch all routes](/docs/routing/dynamic-routes.md#catch-all-routes), since Next.js 9.5.3 (for older versions check our [previous docs](https://nextjs.org/docs/tag/v9.5.2/api-reference/next/link#dynamic-routes)). However, it can become quite common and handy to use [interpolation](/docs/routing/introduction.md#linking-to-dynamic-paths) or an [URL Object](#with-url-object) to generate the link.
There is nothing to do when linking to a [dynamic route](/docs/routing/dynamic-routes.md), including [catch all routes](/docs/routing/dynamic-routes.md#catch-all-routes), since Next.js 9.5.3 (for older versions check our [previous docs](https://nextjs.org/docs/tag/v9.5.2/api-reference/next/link#dynamic-routes)). However, it can become quite common and handy to use [interpolation](/docs/routing/introduction.md#linking-to-dynamic-paths) or an [URL Object](#with-url-object) to generate the link.

For example, the dynamic route `pages/blog/[slug].js` will match the following link:

Expand Down
Loading