From 6b143780f70b1e160f6ddee3d792a51d4d639a52 Mon Sep 17 00:00:00 2001 From: Rita Correia <66278659+ritaxcorreia@users.noreply.github.com> Date: Thu, 28 Jan 2021 10:46:43 +0000 Subject: [PATCH 1/3] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c85fe43..f23913a 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ npm install --save next-on-netlify 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). -It's super simple. Just create a `next.config.js` file and write the following: +It's super simple. Just create a `next.config.js` file in the root of your folder and write the following: ```js // next.config.js @@ -95,7 +95,8 @@ module.exports = { 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\*. -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: +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: + ``` { @@ -113,7 +114,7 @@ We want the next-on-netlify command to run after we build our Next.js applicatio ### 3. Configure for Netlify -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: +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 folder and the following instructions: ```toml [build] @@ -146,6 +147,8 @@ need to: We're done. Let's deploy 🚀🚀🚀 +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/ + ## Demo - Site: https://next-on.netlify.com/ From e3f89bc1920f24fd1595216b5c76d6f438107488 Mon Sep 17 00:00:00 2001 From: Rita Correia <66278659+ritaxcorreia@users.noreply.github.com> Date: Thu, 28 Jan 2021 18:46:15 +0000 Subject: [PATCH 2/3] Update README.md Co-authored-by: lindsaylevine <57350178+lindsaylevine@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f23913a..abd8e26 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ npm install --save next-on-netlify 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). -It's super simple. Just create a `next.config.js` file in the root of your folder and write the following: +It's super simple. Just create a `next.config.js` file in the root of your project and write the following: ```js // next.config.js From 620668836078f35ac448cea29878cd4153927b7a Mon Sep 17 00:00:00 2001 From: lindsaylevine <57350178+lindsaylevine@users.noreply.github.com> Date: Fri, 29 Jan 2021 01:02:23 -0800 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index abd8e26..c96565a 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ We want the next-on-netlify command to run after we build our Next.js applicatio ### 3. Configure for Netlify -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 folder and the following instructions: +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: ```toml [build]