Skip to content

Commit

Permalink
Minor edits to standardize format and language (#4371)
Browse files Browse the repository at this point in the history
* Minor edits to standardize format and language

I took out all the "simple, easy, basic" words and reformatted a few things.

* kyle's suggestions

@KyleAMathews addressed your comments. Thanks!!
  • Loading branch information
shannonbux authored and KyleAMathews committed Mar 7, 2018
1 parent 37512fe commit 2f8d815
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 25 deletions.
12 changes: 6 additions & 6 deletions docs/tutorial/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ We’re so happy you decided to try using Gatsby. This tutorial has five parts t

Note: If you prefer a quick start rather than step-by-step tutorial, see the [getting started page](/docs/).

This tutorial is for _everyone_! You do not need to be a programmer or React.js expert. We'll walk you through things.
This tutorial is for *everyone*! You do not need to be a programmer or React.js expert. We'll walk you through things.

0. [Programming basics](/tutorial/part-zero/): If you are new to programming, go here for an introduction to some basics like terminal, code editors, and browser consoles.
1. [Introduction to basics of Gatsby](/tutorial/part-one/) - Starting new projects, developing, and deploying sites.
1. [Introduction to using CSS in Gatsby](/tutorial/part-two/): Explore libraries like Typography.js and CSS Modules.
1. [Building nested layouts in Gatsby](/tutorial/part-three/). Layouts are sections of your site that are reused across multiple pages like headers and footers.
1. [Learn how to work with GraphQL](/tutorial/part-four/). Explore source & transformer plugins. Get introduced to programmatic pages and how to write GraphQL queries. In this part of the tutorial we'll build a bare-bones markdown blog.
0. [Programming basics](/tutorial/part-zero/): If you are new to programming, go here for an introduction to some basics like terminal, code editors, and browser consoles.
1. [Introduction to Gatsby basics](/tutorial/part-one/) - Starting new projects, developing, and deploying sites.
2. [Introduction to using CSS in Gatsby](/tutorial/part-two/): Explore libraries like Typography.js and CSS Modules.
3. [Building nested layouts in Gatsby](/tutorial/part-three/). Layouts are sections of your site that are reused across multiple pages like headers and footers.
4. [Learn how to query data with GraphQL](/tutorial/part-four/). Explore source & transformer plugins. Get introduced to programmatic pages and how to write GraphQL queries. In this part of the tutorial we'll build a bare-bones markdown blog.
37 changes: 19 additions & 18 deletions docs/tutorial/part-one/index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
---
title: Gatsby.js Tutorial Part One
title: Introduction to Gatsby basics
typora-copy-images-to: ./
---

Hello fellow Gatsby-er! Welcome to _part one_ of our community Gatsby.js
tutorial.

## What's in this tutorial?

In this tutorial you'll be gently introduced to the Gatsby development
environment, how to create component pages, and how to build and deploy Gatsby
sites.
Expand All @@ -22,7 +24,7 @@ computer's terminal. Gatsby is built using Node.js.

Open a terminal window. See
[terminal instructions for Mac users](http://www.macworld.co.uk/feature/mac-software/how-use-terminal-on-mac-3608274/) and
[terminal instructions for Windows users](https://www.quora.com/How-do-I-open-terminal-in-windows). In your terminal window, type `node --version` and hit ENTER, then `npm --version` and hit ENTER.
[terminal instructions for Windows users](https://www.quora.com/How-do-I-open-terminal-in-windows). In your terminal window, type `node --version` and hit ENTER, then `npm --version` and hit ENTER (tip: to run a specified command, you must type the command into your terminal and then press ENTER. Then the command will run).

You should see something like:

Expand All @@ -36,12 +38,11 @@ recommended version for your operating system.
## Install the "Hello World" starter

Gatsby uses "starters" for starting new projects. Starters
are partially built Gatsby sites pre-configured to help you get moving faster.
are partially built Gatsby sites that are pre-configured to help you get moving faster.
There are several official starters and many others contributed from the Gatsby
community! [See the Starters page for the full list](/docs/gatsby-starters/).

To install a starter, first install Gatsby's terminal program by typing the
following command into the terminal window and hit ENTER.
To install a starter, first install Gatsby's command line program by running the following:

```sh
npm install --global gatsby-cli
Expand Down Expand Up @@ -93,7 +94,7 @@ automatically created in the location you chose when you ran the `gatsby new` te
Once you've opened the "tutorial-part-one" folder in your code editing
software, it's time to edit your website. You'll see groups of directories and files; find the file in this location: `src/pages/index.js`. Once you open that file, try changing "Hello
world!" in the page component to "Hello Gatsby!". Once you save that change, the text in your browser
should change within a second.
should change within a second (tip: you will always need to save changes before they appear in your browser).

Try some other tricks, like the ones below:

Expand Down Expand Up @@ -200,12 +201,14 @@ pages!
<p>Your browser does not support the video element.</p>
</video>

*Challenge*: Using the instructions above as hints, see if you can create a third page and link to it from the home page.

## Interactive page

One nice thing about using Gatsby for building websites vs. other tools is that itʼs easier to add interactivity to your pages. React.js was designed for
Facebook.com and is used on many other world-class web applications.

Let's see how easy it is to add interactive elements to our pages. Let's start with a counter.
Let's see how to add interactive elements to our pages. Let's start with a counter.

We'll start by creating a new link to a page at `/counter`/ from our original
`index.js` page component `<Link to="/counter/">Counter</Link>`.
Expand Down Expand Up @@ -270,7 +273,7 @@ class Counter extends React.Component {
export default Counter
```

So now we have everything we need to make a nice counter. Let's make it live.
Now we have everything we need to make a nice counter. Let's make it live.

First we'll set up the component state.

Expand Down Expand Up @@ -332,19 +335,17 @@ export default Counter

There you go! A working React.js counter inside your static website 👌

One fun thing too is that hot reloading isn't just for content and styles but it
works on code as well. Try changing the amount by which clicking on the buttons
changes the count.
*Bonus challenge*: One fun thing is that hot reloading isn't just for content and styles; it
works on code as well. Currently, when you click the buttons on the counter, the numbers go up and down in increments of 1. Try to make the counter go up and down in a different increments (for example, 5).

## Deploying Gatsby.js websites on the web

Gatsby.js is a _static site generator_, which makes deploying Gatsby sites to the
web much easier vs. traditional CMSs. There are no servers to setup or complicated databases to
Gatsby.js is a _static site generator_, which means there are no servers to setup or complicated databases to
deploy. Instead, the Gatsby `build` command produces a directory of static HTML
and JavaScript files which you can deploy to a static site hosting service.

Let's try using [Surge](http://surge.sh/) for deploying our first Gatsby
website. Surge is one of many "static site hosts" which make it really easy to
website. Surge is one of many "static site hosts" which make it possible to
deploy Gatsby sites.

If you haven't previously installed & setup Surge, open a new terminal window and install their terminal tool:
Expand Down Expand Up @@ -379,12 +380,12 @@ Once this finishes running, you should see in your terminal something like:
![Screenshot of publishing Gatsby site with Surge](surge-deployment.png)

Open the web address listed on the bottom line (`lowly-pain.surge.sh` in this
case) and you'll see your newly published site!
case) and you'll see your newly published site! Good work!

## Good work!
## What's coming next?

In this tutorial, you've installed Gatsby, played in the development
environment, and deployed your first site! Awesome! We hope you're enjoying
yourself so far. Feel free to continue now to
[the second part of the tutorial](/tutorial/part-two/) or go exploring around
yourself so far. Feel free to continue now to part two of the tutorial,
["Introduction to using CSS in Gatsby"](/tutorial/part-two/), or go exploring around
the rest of the site.
2 changes: 1 addition & 1 deletion www/src/pages/docs/tutorial-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
link: /tutorial/
- title: 0. Programming basics
link: /tutorial/part-zero/
- title: 1. Introduction to basics of Gatsby
- title: 1. Introduction to Gatsby basics
link: /tutorial/part-one/
items:
- title: Check Environment
Expand Down

0 comments on commit 2f8d815

Please sign in to comment.