Skip to content

Commit

Permalink
fix(docs): change bash to shell in code language blocks (#22899)
Browse files Browse the repository at this point in the history
Co-authored-by: Lennart <lekoarts@gmail.com>
Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
  • Loading branch information
3 people committed Jun 22, 2020
1 parent 1364453 commit 6b6b2f2
Show file tree
Hide file tree
Showing 30 changed files with 83 additions and 83 deletions.
Expand Up @@ -229,7 +229,7 @@ the base theme to meet their specific requirements.
Themes (like plugins) will be published on NPM. So soon, starting a new Gatsby
blog will be as simple as:

```bash
```shell
npm install --save gatsby-super-cool-theme
gatsby build --theme gatsby-super-cool-theme
```
Expand Down
6 changes: 3 additions & 3 deletions docs/blog/2017-07-19-creating-a-blog-with-gatsby/index.md
Expand Up @@ -80,7 +80,7 @@ blog, you can use the following plugins:

with the following command:

```bash
```shell
yarn add gatsby-plugin-catch-links gatsby-plugin-react-helmet
```

Expand Down Expand Up @@ -122,7 +122,7 @@ Markdown, let's add that [`gatsby-source-filesystem`][gatsby-source-filesystem]
plugin. Similarly to the previous step, install the plugin and then inject
into your `gatsby-config.js`, like so:

```bash
```shell
yarn add gatsby-source-filesystem
```

Expand Down Expand Up @@ -173,7 +173,7 @@ installed.

The process should be familiar by now, install and then add to config.

```bash
```shell
yarn add gatsby-transformer-remark
```

Expand Down
Expand Up @@ -110,7 +110,7 @@ should have a file structure that looks something like this:

Now run the Gatsby dev server to make sure everything works:

```bash
```shell
npm run develop
```

Expand Down Expand Up @@ -180,7 +180,7 @@ If you play around with GraphiQL you'll notice there's not that much there.
Let's fix that. We need to teach Gatsby how to query the file system. Luckily
this is so common it's been done for you. Install the file system source plugin:

```bash
```shell
npm i --save gatsby-source-filesystem
```

Expand Down Expand Up @@ -229,7 +229,7 @@ Being able to query files is a big win, and if you have a directory of HTML
files this is all you will need. But if you want to render markdown files as
HTML you will need another plugin. Let's add that now:

```bash
```shell
npm i --save gatsby-transformer-remark
```

Expand Down
Expand Up @@ -32,19 +32,19 @@ This guide assumes that you have [GatsbyJS installed](/docs/) and, optionally, a

Start by using this with the Gatsby CLI:

```bash
```shell
gatsby new contentful-starter https://github.com/contentful/starter-gatsby-blog
```

Alternatively, you can also clone a sample repo from GitHub:

```bash
```shell
git clone git@github.com:contentful/starter-gatsby-blog.git
```

And go into the directory and install the required dependencies with:

```bash
```shell
npm install
```

Expand Down
Expand Up @@ -32,25 +32,25 @@ In order to start working on the blog, we first have to set up the environment.

First, install the Gatsby CLI:

```bash
```shell
npm install --global gatsby-cli
```

Create a new site based on the Gatsby Cosmic starter:

```bash
```shell
gatsby new gatsby-blog-cosmicjs
```

Enter in your project's folder:

```bash
```shell
cd gatsby-blog-cosmicjs
```

Start the server:

```bash
```shell
npm run develop
```

Expand All @@ -68,13 +68,13 @@ In our case, we are using [Cosmic](https://cosmicjs.com). We need a source plugi

Install the source plugin with the following command:

```bash
```shell
npm install --save gatsby-source-cosmicjs
```

We're going to use a couple other plugins later, so let's install them here:

```bash
```shell
npm install --save gatsby-plugin-offline gatsby-source-filesystem
```

Expand Down
20 changes: 10 additions & 10 deletions docs/blog/2018-1-18-strapi-and-gatsby/index.md
Expand Up @@ -99,7 +99,7 @@ _Requirements: please make sure [Node 10](https://nodejs.org/en/download/) (or h

Install Strapi using npm:

```bash
```shell
npm i strapi@alpha -g
```

Expand All @@ -109,13 +109,13 @@ _Note: Strapi v3 is still an alpha version, but it will be fine for this tutoria

Create a directory named `tutorial`:

```bash
```shell
mkdir tutorial
```

Navigate into `tutorial`and then, using a single command, set-up and start your project inside your `tutorial` folder:

```bash
```shell
cd tutorial
strapi new cms --quickstart
```
Expand All @@ -138,13 +138,13 @@ After installation, and initial use, you will often close your project and work

Enter inside your project folder, on the command line, (in this case `tutorial/`, :

```bash
```shell
cd cms
```

From `cms/`, launch the Strapi server:

```bash
```shell
strapi start
```

Expand Down Expand Up @@ -215,29 +215,29 @@ _Important links from Video:_

First, install Gatsby CLI:

```bash
```shell
npm install --global gatsby-cli
```

#### Generate a Gatsby project

In the folder `tutorial` that you previously created, generate your brand new blog:

```bash
```shell
gatsby new blog
```

#### Start in development mode

Enter in your project's folder:

```bash
```shell
cd blog
```

Start the server:

```bash
```shell
gatsby develop
```

Expand All @@ -255,7 +255,7 @@ In this example, we are using Strapi. Obviously, we are going to need a source p

Let's install it:

```bash
```shell
npm install --save gatsby-source-strapi
```

Expand Down
10 changes: 5 additions & 5 deletions docs/blog/2018-11-05-deploying-gatsby-to-azure/index.md
Expand Up @@ -21,7 +21,7 @@ To complete this tutorial you will need the following tools:

Install Node from the [Node website](https://nodejs.org/en/) and check it's installed by checking the version from your terminal.

```bash
```shell
node -v
v10.9.0
```
Expand All @@ -30,7 +30,7 @@ Install VS Code from the [VS Code website](https://code.visualstudio.com/).

Next, we can install the important part! [Gatsby](https://gatsbyjs.org/) from your terminal, run:

```bash
```shell
npm install --global gatsby-cli
+ gatsby-cli@2.4.2
updated 1 package in 4.868s
Expand All @@ -44,7 +44,7 @@ Next you will create the blog from the handy [Gatsby Starter Blog](https://githu
From your terminal run

```bash
```shell
gatsby new azure-blog https://github.com/gatsbyjs/gatsby-starter-blog

info Creating new site from git: https://github.com/gatsbyjs/gatsby-starter-blog.git
Expand All @@ -61,7 +61,7 @@ info Installing packages...

You can now view your website by running

```bash
```shell
cd azure-blog
npm run develop
```
Expand Down Expand Up @@ -113,7 +113,7 @@ Change the option to `enabled`, set a default document name of `index.html` and

You are now ready to produce a production build of your blog. Make sure you're in the blog folder and then run.

```bash
```shell
gatsby build

success open and validate gatsby-config — 0.010 s
Expand Down
Expand Up @@ -21,15 +21,15 @@ It can be a big tricky to add MDX to an existing blog. The following 5 steps wil

You can also see the [full changes in PR #19580](https://github.com/gatsbyjs/gatsby/pull/19580/files) for an overview of the changes you have to make to get MDX working. As stated above, this introduces changes to [Gatsby's blog starter](https://github.com/gatsbyjs/gatsby-starter-blog/tree/master), which you can install with Gatsby CLI.

```bash
```shell
gatsby new my-blog-starter https://github.com/gatsbyjs/gatsby-starter-blog
```

### Step 1

Install [gatsby-plugin-mdx](/packages/gatsby-plugin-mdx/), the official plugin for using MDX with Gatsby. Also install `gatsby-plugin-feed-mdx` for our RSS feeds. Finally, install `@mdx-js/mdx` and `@mdx-js/react`.

```bash
```shell
npm install --save gatsby-plugin-mdx gatsby-plugin-feed-mdx @mdx-js/mdx @mdx-js/react
```

Expand Down Expand Up @@ -102,7 +102,7 @@ Then, replace `gatsby-plugin-feed` with `gatsby-plugin-feed-mdx`. This will allo

Now, since we're no longer using `gatsby-transformer-remark` and `gatsby-plugin-feed`, you can uninstall them.

```bash
```shell
npm uninstall --save gatsby-transformer-remark gatsby-plugin-feed
```

Expand Down
Expand Up @@ -24,7 +24,7 @@ Want to see a more advanced example of TinaCMS integrated with a Gatsby website?

First we need to get a local development environment set up for the site. Please reference the Gatsby Starter Blog [README](https://github.com/gatsbyjs/gatsby-starter-blog/#readme) for extra notes on this.

```bash
```shell
gatsby new tina-tutorial https://github.com/gatsbyjs/gatsby-starter-blog
cd tina-tutorial
```
Expand All @@ -33,7 +33,7 @@ cd tina-tutorial

As usual when setting up a new tool, we need to install a few packages. We will install `gatsby-plugin-tinacms`, which sets up the core Tina functionality. Along with that, we'll need the peer-dependency, `styled-components`, to keep the sidebar pretty. Since this site uses markdown, we'll install `gatsby-tinacms-remark`. And `gatsby-tinacms-git` will setup our Git API.

```bash
```shell
yarn add gatsby-plugin-tinacms gatsby-tinacms-remark gatsby-tinacms-git styled-components
```

Expand Down
30 changes: 15 additions & 15 deletions docs/blog/2020-01-08-git-workflows/index.md
Expand Up @@ -105,12 +105,12 @@ In this alternative flow, we're _leveraging_ Git to show us what work needs to b

Once we've fixed all the conflicts, we can finish up our rebase by running the following:

```bash
```shell
# stage all the changes we just made
$ git add .
git add .

# wrap up the rebase
$ git rebase --continue
git rebase --continue
```

After rebasing, our Git branches look like this:
Expand All @@ -129,8 +129,8 @@ You'll notice that our `C` commit—the only commit in our `pt2` branch—has be

Because we've rewritten the history, by turning `C` into `E`, we need to force-push to update our PR on GitHub:

```bash
$ git push origin feat/headless-cms-pt2 -f
```shell
git push origin feat/headless-cms-pt2 -f
```

### Merging PRs
Expand Down Expand Up @@ -228,9 +228,9 @@ The Git history pollution isn't a huge deal, since we'll have the chance to squa

If you do wind up squash-merging a branch, you'll need to manually snip out the duplicate commits. You can do this with an [interactive rebase](https://hackernoon.com/beginners-guide-to-interactive-rebasing-346a3f9c3a6d):

```bash
$ git checkout feat/headless-cms-pt2
$ git rebase -i feat/headless-cms
```shell
git checkout feat/headless-cms-pt2
git rebase -i feat/headless-cms
# A popup will open, presenting you with a list of commits.
# Delete the lines that contain work covered by the squashed
# commit. Save and close the file.
Expand All @@ -242,18 +242,18 @@ The work we're doing in this example to migrate to a headless CMS might take a w

To accomplish this, we'll do some more local rebasing:

```bash
```shell
# Update our local state
$ git checkout master
$ git pull origin master
git checkout master
git pull origin master

# Rebase our root branch
$ git checkout feat/headless-cms
$ git rebase master
git checkout feat/headless-cms
git rebase master

# Continue down the chain
$ git checkout feat/headless-cms-pt2
$ git rebase feat/headless-cms
git checkout feat/headless-cms-pt2
git rebase feat/headless-cms
```

Essentially, we're scooting all of our changes to happen _after_ the most recent commit on master. It's important to rebase instead of merge so that we don't "interleave" the changes from other branches—we're keeping all of our work tightly clustered for now. This can be a bit tedious if you have lots of incremental branches, so you may wish to hold off on this until you've merged everything into the root branch.
Expand Down
2 changes: 1 addition & 1 deletion docs/blog/gatsbygram-case-study/index.md
Expand Up @@ -530,7 +530,7 @@ It's easy to create your own "Gatsbygram" site from an Instagram account.

### Instructions on setting up your own Gatsbygram site

```bash
```shell
# Clone the Gatsby repo.
git clone -b 1.0 git@github.com:gatsbyjs/gatsby.git
cd gatsby/examples/gatsbygram
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/ab-testing-with-google-analytics-and-netlify.md
Expand Up @@ -25,7 +25,7 @@ The following example changes the color of the header for a site using [Gatsby's

Once you're finished with your first variation, commit your changes to `master`, [create a new remote repository on GitHub](https://help.github.com/en/github/getting-started-with-github/create-a-repo) if you don't have one already, and push your changes.

```bash
```shell
git add src/components/header.js
git commit -m "Change header background color"
git remote add origin [your remote repo URL]
Expand All @@ -34,7 +34,7 @@ git push -u origin master

To create your second variation, create a new branch.

```bash
```shell
git checkout -b heading-variation
```

Expand Down

0 comments on commit 6b6b2f2

Please sign in to comment.