Skip to content
This repository was archived by the owner on May 10, 2021. It is now read-only.

Commit 6e5c09d

Browse files
Update README with clearer setup/deploy instructions (#160)
* Update README.md Hi Netlify team! 👋 I was following this great step by step guide to deploy my Next.js website and spotted a few things that could be clearer for first timers or early career devs, like me. * Update README.md Co-authored-by: lindsaylevine <[email protected]> * Update README.md Co-authored-by: lindsaylevine <[email protected]>
1 parent 11328ad commit 6e5c09d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ npm install --save next-on-netlify
6868

6969
We must build our Next.js app as a serverless app. You can read more about serverless Next.js [here](https://nextjs.org/docs/api-reference/next.config.js/build-target#serverless-target).
7070

71-
It's super simple. Just create a `next.config.js` file and write the following:
71+
It's super simple. Just create a `next.config.js` file in the root of your project and write the following:
7272

7373
```js
7474
// next.config.js
@@ -95,7 +95,8 @@ module.exports = {
9595

9696
The next-on-netlify package adds the `next-on-netlify` command. When we run this command, some magic happens to prepare our Next.js app for hosting on Netlify\*.
9797

98-
We want the next-on-netlify command to run after we build our Next.js application. So let's add a postbuild hook to our package.json file:
98+
We want the next-on-netlify command to run after we build our Next.js application. So let's add a postbuild hook to our package.json file. You should add `"postbuild": "next-on-netlify"` to the existing scripts, like so:
99+
99100

100101
```
101102
{
@@ -113,7 +114,7 @@ We want the next-on-netlify command to run after we build our Next.js applicatio
113114

114115
### 3. Configure for Netlify
115116

116-
We're almost done! We just have to tell Netlify how to build our Next.js app, where the functions folder is located, and which folder to upload to its CDN. We do that with a `netlify.toml` file and the following instructions:
117+
We're almost done! We just have to tell Netlify how to build our Next.js app, where the functions folder is located, and which folder to upload to its CDN. We do that with a `netlify.toml` file in the root of your project and the following instructions:
117118

118119
```toml
119120
[build]
@@ -146,6 +147,8 @@ need to:
146147

147148
We're done. Let's deploy 🚀🚀🚀
148149

150+
If you're not familiar with Netlify, follow the deployment instructions here: https://www.netlify.com/blog/2020/11/30/how-to-deploy-next.js-sites-to-netlify/
151+
149152
## Demo
150153

151154
- Site: https://next-on.netlify.com/

0 commit comments

Comments
 (0)