You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Improved headers and clarity in tutorial part zero
* Further simplify headings
* Improve Git section
* Improve the summary
* Add optional link explaining git
* Remove other reference to learn about git
* Fix titles and links to match new headings
* Clarify that git only needs to be installed to use Gatsby
* Mention that the git handbook also explains Github
* Revert "Fix titles and links to match new headings"
This reverts commit 511bc37.
* Revert the headings back to having verbs
* Reword references to Gatsby CLI to make it clear it is not the only Gatsby CLI
* Change 'Create a Gatsby site' heading back
* Fix title to match heading
* Clarify git sentence
* Add missing space
Copy file name to clipboardExpand all lines: docs/tutorial/part-zero/index.md
+28-24Lines changed: 28 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Set Up Your Development Environment
3
3
typora-copy-images-to: ./
4
4
---
5
5
6
-
Before you start to code, you’ll need to familiarize with some core web technologies, and make sure that you have installed all required software tools.
6
+
Before you start building your first Gatsby site, you’ll need to familiarize yourself with some core web technologies and make sure that you have installed all required software tools.
7
7
8
8
## Overview of core technologies
9
9
@@ -17,7 +17,7 @@ It’s not necessary to be an expert with these already — if you’re not, don
17
17
18
18
> 💡 (Optional!) For a comprehensive introduction to what a website is--including an intro to HTML and CSS--check out “[**Building your first web page**](https://learn.shayhowe.com/html-css/building-your-first-web-page/)”. It’s a great place to start learning about the web. For a more hands-on introduction to [**HTML**](https://www.codecademy.com/learn/learn-html), [**CSS**](https://www.codecademy.com/learn/learn-css), and [**JavaScript**](https://www.codecademy.com/learn/introduction-to-javascript), check out the tutorials from Codecademy. [**React**](https://reactjs.org/tutorial/tutorial.html) and [**GraphQL**](http://graphql.org/graphql-js/) also have their own introductory tutorials.
19
19
20
-
## Familiarize with command line
20
+
## Familiarize yourself with the command line
21
21
22
22
The command line is a text-based interface used to run commands on your computer. You’ll also often see it referred to as the terminal. In this tutorial we’ll use both interchangeably. It’s a lot like using the Finder on a Mac or Explorer on Windows. Finder and Explorer are examples of graphical user interfaces (GUI). The command line is a powerful, text-based way to interact with your computer.
23
23
@@ -27,13 +27,13 @@ Take a moment to locate and open up the command line interface (CLI) for your co
27
27
28
28
## Install Node.js
29
29
30
-
Node.js is an environment that can run JavaScript code. Gatsby is built with Node.js. To get up and running with Gatsby, you’ll need to have a recent version installed on your computer.
30
+
Node.js is an environment that can run JavaScript code outside of a web browser. Gatsby is built with Node.js. To get up and running with Gatsby, you’ll need to have a recent version installed on your computer.
31
31
32
32
### ⌚ Download Node.js
33
33
34
34
Visit the [**Node.js site**](https://nodejs.org/) and follow the instructions to download and install the recommended version for your operating system. Once you have followed the installation steps, make sure everything was installed properly:
35
35
36
-
### ✋ Check your Node.js installation
36
+
### Check your Node.js installation
37
37
38
38
1. Open up your terminal.
39
39
2. Run `node --version`. (If you’re new to the command line, “run `command`” means “type `node --version` in the command prompt, and hit the Enter key”. From here on, this is what we mean by “run `command`”).
@@ -43,7 +43,7 @@ The output of each of those commands should be a version number. Your versions m
43
43
44
44

45
45
46
-
## Familiarize with npm
46
+
## Familiarize yourself with npm
47
47
48
48
npm is a JavaScript package manager. A package is a module of code that you can choose to include in your projects. If you just downloaded and installed Node.js, npm was installed with it!
49
49
@@ -57,15 +57,19 @@ npm has three distinct components: the npm website, the npm registry, and the np
57
57
58
58
## Install Git
59
59
60
-
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. When you install a Gatsby "starter" site, Gatsby uses Git behind the scenes to download and install the required files for your starter.
60
+
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. When you install a Gatsby "starter" site, Gatsby uses Git behind the scenes to download and install the required files for your starter. You will need to have Git installed to set up your first Gatsby site.
61
61
62
-
If your system does not have Git installed, install it from the [**Git downloads page**](https://git-scm.com/downloads).
62
+
The steps to download and install Git depend on your operating system. Follow the guide for your system:
63
63
64
-
## Install the Gatsby CLI
64
+
-[Install Git on macOS](https://www.atlassian.com/git/tutorials/install-git#mac-os-x)
65
+
-[Install Git on Windows](https://www.atlassian.com/git/tutorials/install-git#windows)
66
+
-[Install Git on Linux](https://www.atlassian.com/git/tutorials/install-git#linux)
65
67
66
-
The Gatsby CLI tool lets you quickly create new Gatsby-powered sites and run commands for developing Gatsby sites. It is a published npm package. You can install the Gatsby CLI from the npm registry, using the npm CLI.
68
+
> 💡 You will not need to know Git to complete this tutorial, but it is a very useful tool. If you are interested in learning more about version control, Git, and Github, check out Github's [Git Handbook](https://guides.github.com/introduction/git-handbook/).
67
69
68
-
### ✋ Install the Gatsby CLI tool
70
+
## Install Gatsby CLI
71
+
72
+
The Gatsby CLI tool lets you quickly create new Gatsby-powered sites and run commands for developing Gatsby sites. It is a published npm package. You can install Gatsby CLI from the npm registry, using the npm CLI.
69
73
70
74
1. Navigate to the terminal.
71
75
2. Run `npm install --global gatsby-cli`.
@@ -78,11 +82,11 @@ A couple of different things are happening here.
78
82
npm install --global gatsby-cli
79
83
```
80
84
81
-
-We’re using the npm CLI to install the Gatsby CLI. `npm install` is the command used to install packages.
82
-
- When installing npm packages, you can install them globally or in a specific project. (We’ll learn about the latter, later). The `--global` flag signals that we want the first option, to install globally. This means our package will be available to us on our computer, outside of the context of a specific project.
85
+
-You're using the npm CLI to install Gatsby CLI. `npm install` is the command used to install packages.
86
+
- When installing npm packages, you can install them globally or in a specific project. (You’ll learn about the latter, later). The `--global` flag signals that we want the first option to install globally. This means your package will be available to you on your computer, outside of the context of a specific project.
83
87
-`gatsby-cli` is the exact name our desired package is registered with on the [**npm registry**](https://www.npmjs.com/package/gatsby-cli).
If successfully installed, running `gatsby --version` should return a version number and running `gatsby --help` will show different commands available to you using the `gatsby-cli` tool.
94
98
95
-
## Create a site
96
-
97
-
Now you can use the gatsby-cli tool to create your first Gatsby site. Using the tool, you can use “starters” (partially built sites with some default configuration) to help you get moving faster on creating a certain type of site. The “Hello World” starter you’ll be using here is a starter with the bare essentials needed for a [Gatsby](/) site.
99
+
## Create a Gatsby site
98
100
99
-
### ✋ Create a Gatsby site
101
+
Now you are ready to use Gatsby CLI tool to create your first Gatsby site. Using the tool, you can download “starters” (partially built sites with some default configuration) to help you get moving faster on creating a certain type of site. The “Hello World” starter you’ll be using here is a starter with the bare essentials needed for a Gatsby site.
100
102
101
103
1. Open up your terminal.
102
104
2. Run `gatsby new hello-world https://github.com/gatsbyjs/gatsby-starter-hello-world`. (_Note: Depending on your download speed, the amount of time this takes will vary. For brevity's sake, the gif below was paused during part of the install_).
@@ -117,7 +119,7 @@ gatsby new hello-world https://github.com/gatsbyjs/gatsby-starter-hello-world
117
119
- Starting with `gatsby` says, ‘hey, we want to use the gatsby-cli tool!’.
118
120
-`new` is a gatsby command to create a new Gatsby project.
119
121
- Here, `hello-world` is an arbitrary title — you could pick anything. The CLI tool will place the code for your new site in a new folder called “hello-world”.
120
-
- Lastly, the GitHub URL specified points to a code repository that holds the starter code you want to use. If you aren't familiar yet with Git and GitHub, you can [learn more here](https://try.github.io/).
122
+
- Lastly, the GitHub URL specified points to a code repository that holds the starter code you want to use.
121
123
122
124
```bash
123
125
cd hello-world
@@ -131,7 +133,7 @@ gatsby develop
131
133
132
134
- This command starts a development server. You will be able to see and interact with your new site in a development environment — local (on your computer, not published to the internet).
133
135
134
-
### ✋ View your site locally
136
+
### View your site locally
135
137
136
138
Open up a new tab in your browser and navigate to [**http://localhost:8000**](http://localhost:8000/).
137
139
@@ -147,11 +149,11 @@ You’ll be able to visit the site locally at [**_http://localhost:8000_**](http
147
149
148
150
A code editor is a program designed specifically for editing computer code. There are many great ones out there. If you haven't worked with a code editor before, we recommend the editor used throughout this tutorial -- [**VS Code**](https://code.visualstudio.com/).
149
151
150
-
### ✋ Download VS Code
152
+
### Download VS Code
151
153
152
-
Visit the [VS Code site](https://code.visualstudio.com/#alt-downloads) and download the version appropriate for your platform.
154
+
Gatsby documentation sometimes includes screenshots of code editors; these screenshots show the VS Code editor, so if you don't have a preferred code editor yet, using VS Code will make sure that your screen looks just like the screenshots in the tutorial and docs. If you choose to use VS Code, visit the [VS Code site](https://code.visualstudio.com/#alt-downloads) and download the version appropriate for your platform.
153
155
154
-
### ✋ Install Prettier plugin
156
+
### Install the Prettier plugin
155
157
156
158
We also recommend using [Prettier](https://github.com/prettier/prettier) -- Prettier is a tool that helps format your code, keeping it consistent and helping to avoid errors.
157
159
@@ -167,9 +169,11 @@ You can use Prettier directly in your editor using the [Prettier VS Code plugin]
167
169
168
170
To summarize, in this section you:
169
171
170
-
- Installed and learned about Node.js and the npm CLI tool
171
-
- Installed and learned about the Gatsby CLI tool
172
+
- Learned about web technologies used with Gatsby (HTML, CSS, JavaScript, React, and GraphQL)
173
+
- Learned about the command line and how to use it
174
+
- Installed and learned about Node.js and the npm CLI tool, the version control system Git, and the Gatsby CLI tool
172
175
- Generated a new Gatsby site using the Gatsby CLI tool
176
+
- Ran the Gatsby development server and visited your site locally
0 commit comments