From f4b516acb9b13709078129470513318cc49f2c43 Mon Sep 17 00:00:00 2001 From: Matt Hamlin Date: Sun, 21 Jan 2018 11:09:37 -0500 Subject: [PATCH 1/4] Add section to the deploy docs page for deploying to now --- docs/docs/deploy-gatsby.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/docs/deploy-gatsby.md b/docs/docs/deploy-gatsby.md index 0d6ffc51edf8b..71f46d7aead00 100644 --- a/docs/docs/deploy-gatsby.md +++ b/docs/docs/deploy-gatsby.md @@ -9,6 +9,7 @@ title: "Deploying Gatsby" * [GitHub Pages](/docs/deploy-gatsby/#github-pages) * [GitLab Pages](/docs/deploy-gatsby/#gitlab-pages) * [Heroku](/docs/deploy-gatsby/#heroku) +* [Now](/docs/deploy-gatsby/#now) ## Netlify @@ -245,6 +246,19 @@ Finally, add a `static.json` file in the root of your project to define the dire } ``` +## Now + +In order to deploy your Gatsby project using [Now](https://zeit.co/now), you can do the following: + +1. Install a node server package (such as `serve`, or `http-server`) locally +2. Add a `start` script to your `package.json` file, this is what Now will use to run your application: + +``` +"start": "serve public/" +``` + +3. Run `now` at the root of your Gatsby project, this will upload your project, run the `build` script, and then your `start` script. + ## Debugging tips ### Don't minify HTML @@ -266,3 +280,7 @@ not caused by Gatsby. React uses HTML comments to help identify locations of components that do not render anything. If you are using a CDN that minifies your HTML, it will eliminate the HTML comments used by React to take control of the page on the client. Cloudflare is a CDN that minifies HTML by default. + +``` + +``` From 483b3911faf383d25da1e50e8bd55de45d8b049d Mon Sep 17 00:00:00 2001 From: Matt Hamlin Date: Sun, 21 Jan 2018 11:09:37 -0500 Subject: [PATCH 2/4] Add section to the deploy docs page for deploying to now --- docs/docs/deploy-gatsby.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/docs/deploy-gatsby.md b/docs/docs/deploy-gatsby.md index 0d6ffc51edf8b..4c88574cec4dc 100644 --- a/docs/docs/deploy-gatsby.md +++ b/docs/docs/deploy-gatsby.md @@ -9,6 +9,7 @@ title: "Deploying Gatsby" * [GitHub Pages](/docs/deploy-gatsby/#github-pages) * [GitLab Pages](/docs/deploy-gatsby/#gitlab-pages) * [Heroku](/docs/deploy-gatsby/#heroku) +* [Now](/docs/deploy-gatsby/#now) ## Netlify @@ -245,6 +246,19 @@ Finally, add a `static.json` file in the root of your project to define the dire } ``` +## Now + +In order to deploy your Gatsby project using [Now](https://zeit.co/now), you can do the following: + +1. Install a node server package (such as `serve`, or `http-server`) locally +2. Add a `start` script to your `package.json` file, this is what Now will use to run your application: + +``` +"start": "serve public/" +``` + +3. Run `now` at the root of your Gatsby project, this will upload your project, run the `build` script, and then your `start` script. + ## Debugging tips ### Don't minify HTML From 4a57f78a0b741eb78026a25bbea83d6f88605514 Mon Sep 17 00:00:00 2001 From: Matt Hamlin Date: Sun, 21 Jan 2018 13:21:34 -0500 Subject: [PATCH 3/4] Add install code snippet --- docs/docs/deploy-gatsby.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/docs/deploy-gatsby.md b/docs/docs/deploy-gatsby.md index 4c88574cec4dc..0e02c65c8c13d 100644 --- a/docs/docs/deploy-gatsby.md +++ b/docs/docs/deploy-gatsby.md @@ -250,7 +250,12 @@ Finally, add a `static.json` file in the root of your project to define the dire In order to deploy your Gatsby project using [Now](https://zeit.co/now), you can do the following: -1. Install a node server package (such as `serve`, or `http-server`) locally +1. Install a node server package (such as `serve`, or `http-server`) + +``` +npm install --save serve +``` + 2. Add a `start` script to your `package.json` file, this is what Now will use to run your application: ``` From 3ceba7f788ffe34a88b09d2ede51ef317787a471 Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Sun, 21 Jan 2018 13:30:20 -0800 Subject: [PATCH 4/4] Update deploy-gatsby.md --- docs/docs/deploy-gatsby.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/docs/deploy-gatsby.md b/docs/docs/deploy-gatsby.md index 0e02c65c8c13d..a00256beed11f 100644 --- a/docs/docs/deploy-gatsby.md +++ b/docs/docs/deploy-gatsby.md @@ -250,19 +250,20 @@ Finally, add a `static.json` file in the root of your project to define the dire In order to deploy your Gatsby project using [Now](https://zeit.co/now), you can do the following: -1. Install a node server package (such as `serve`, or `http-server`) +1. Install the Now CLI -``` -npm install --save serve -``` +`npm install -g now` -2. Add a `start` script to your `package.json` file, this is what Now will use to run your application: +2. Install a node server package (such as `serve`, or `http-server`) -``` -"start": "serve public/" -``` +`npm install --save serve` + +3. Add a `start` script to your `package.json` file, this is what Now will use to run your application: + + +`"start": "serve public/"` -3. Run `now` at the root of your Gatsby project, this will upload your project, run the `build` script, and then your `start` script. +4. Run `now` at the root of your Gatsby project, this will upload your project, run the `build` script, and then your `start` script. ## Debugging tips