Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs): change bash to shell in code language blocks #22899

Merged
merged 9 commits into from
Jun 22, 2020
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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-userland/gatsby-contentful-starter
```

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

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

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

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

Expand Down
Original file line number Diff line number Diff line change
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 JS 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 JS](https://cosmicjs.com). We need a source pl

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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
10 changes: 5 additions & 5 deletions docs/blog/2020-01-08-git-workflows/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Our `pt1` PR is approved (🎉), but now we have to reconcile our `pt2` branch.

We check out the `pt2` branch and rebase it onto the updated `pt1` branch:

```bash
```shell
$ git checkout feat/headless-cms-pt2
$ git rebase feat/headless-cms-pt1
MichaelDeBoey marked this conversation as resolved.
Show resolved Hide resolved
```
Expand All @@ -103,7 +103,7 @@ 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 .
MichaelDeBoey marked this conversation as resolved.
Show resolved Hide resolved

Expand All @@ -127,7 +127,7 @@ 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
```shell
$ git push origin feat/headless-cms-pt2 -f
MichaelDeBoey marked this conversation as resolved.
Show resolved Hide resolved
```

Expand Down Expand Up @@ -226,7 +226,7 @@ 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
```shell
$ git checkout feat/headless-cms-pt2
$ git rebase -i feat/headless-cms
MichaelDeBoey marked this conversation as resolved.
Show resolved Hide resolved
# A popup will open, presenting you with a list of commits.
Expand All @@ -240,7 +240,7 @@ 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
MichaelDeBoey marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
2 changes: 1 addition & 1 deletion docs/blog/gatsbygram-case-study/index.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion docs/docs/end-to-end-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ A good use case for writing automated end-to-end tests is asserting **accessibil

To use cypress-axe, you have to install the `cypress-axe` and [axe-core](https://github.com/dequelabs/axe-core) packages. You'll also use some commands from [@testing-library/cypress](https://testing-library.com/docs/cypress-testing-library/intro) to select elements — see [best practices for selecting elements](https://docs.cypress.io/guides/references/best-practices.html#Selecting-Elements).

```bash
```shell
npm install --save-dev cypress-axe axe-core @testing-library/cypress
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/gatsby-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To start working with Gatsby Image, install the `gatsby-image` package along wit

A common way to source images is to install and use `gatsby-source-filesystem` to connect your local files, but other source plugins can be used as well, such as `gatsby-source-contentful`, `gatsby-source-datocms` and `gatsby-source-sanity`.

```bash
```shell
npm install --save gatsby-image gatsby-plugin-sharp gatsby-transformer-sharp
```

Expand Down