Skip to content

Commit 6b6b2f2

Browse files
mueschaLekoArtsgatsbybot
authored
fix(docs): change bash to shell in code language blocks (#22899)
Co-authored-by: Lennart <lekoarts@gmail.com> Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
1 parent 1364453 commit 6b6b2f2

30 files changed

Lines changed: 83 additions & 83 deletions

File tree

docs/blog/2017-02-21-1-0-progress-update-where-came-from-where-going/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ the base theme to meet their specific requirements.
229229
Themes (like plugins) will be published on NPM. So soon, starting a new Gatsby
230230
blog will be as simple as:
231231

232-
```bash
232+
```shell
233233
npm install --save gatsby-super-cool-theme
234234
gatsby build --theme gatsby-super-cool-theme
235235
```

docs/blog/2017-07-19-creating-a-blog-with-gatsby/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ blog, you can use the following plugins:
8080

8181
with the following command:
8282

83-
```bash
83+
```shell
8484
yarn add gatsby-plugin-catch-links gatsby-plugin-react-helmet
8585
```
8686

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

125-
```bash
125+
```shell
126126
yarn add gatsby-source-filesystem
127127
```
128128

@@ -173,7 +173,7 @@ installed.
173173

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

176-
```bash
176+
```shell
177177
yarn add gatsby-transformer-remark
178178
```
179179

docs/blog/2017-10-01-migrating-my-blog-from-hexo-to-gatsby/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ should have a file structure that looks something like this:
110110

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

113-
```bash
113+
```shell
114114
npm run develop
115115
```
116116

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

183-
```bash
183+
```shell
184184
npm i --save gatsby-source-filesystem
185185
```
186186

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

232-
```bash
232+
```shell
233233
npm i --save gatsby-transformer-remark
234234
```
235235

docs/blog/2018-04-04-gatsby-contentful-starter-tutorial/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@ This guide assumes that you have [GatsbyJS installed](/docs/) and, optionally, a
3232

3333
Start by using this with the Gatsby CLI:
3434

35-
```bash
35+
```shell
3636
gatsby new contentful-starter https://github.com/contentful/starter-gatsby-blog
3737
```
3838

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

41-
```bash
41+
```shell
4242
git clone git@github.com:contentful/starter-gatsby-blog.git
4343
```
4444

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

47-
```bash
47+
```shell
4848
npm install
4949
```
5050

docs/blog/2018-06-07-build-a-gatsby-blog-using-the-cosmic-js-source-plugin/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,25 @@ In order to start working on the blog, we first have to set up the environment.
3232

3333
First, install the Gatsby CLI:
3434

35-
```bash
35+
```shell
3636
npm install --global gatsby-cli
3737
```
3838

3939
Create a new site based on the Gatsby Cosmic starter:
4040

41-
```bash
41+
```shell
4242
gatsby new gatsby-blog-cosmicjs
4343
```
4444

4545
Enter in your project's folder:
4646

47-
```bash
47+
```shell
4848
cd gatsby-blog-cosmicjs
4949
```
5050

5151
Start the server:
5252

53-
```bash
53+
```shell
5454
npm run develop
5555
```
5656

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

6969
Install the source plugin with the following command:
7070

71-
```bash
71+
```shell
7272
npm install --save gatsby-source-cosmicjs
7373
```
7474

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

77-
```bash
77+
```shell
7878
npm install --save gatsby-plugin-offline gatsby-source-filesystem
7979
```
8080

docs/blog/2018-1-18-strapi-and-gatsby/index.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ _Requirements: please make sure [Node 10](https://nodejs.org/en/download/) (or h
9999

100100
Install Strapi using npm:
101101

102-
```bash
102+
```shell
103103
npm i strapi@alpha -g
104104
```
105105

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

110110
Create a directory named `tutorial`:
111111

112-
```bash
112+
```shell
113113
mkdir tutorial
114114
```
115115

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

118-
```bash
118+
```shell
119119
cd tutorial
120120
strapi new cms --quickstart
121121
```
@@ -138,13 +138,13 @@ After installation, and initial use, you will often close your project and work
138138

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

141-
```bash
141+
```shell
142142
cd cms
143143
```
144144

145145
From `cms/`, launch the Strapi server:
146146

147-
```bash
147+
```shell
148148
strapi start
149149
```
150150

@@ -215,29 +215,29 @@ _Important links from Video:_
215215

216216
First, install Gatsby CLI:
217217

218-
```bash
218+
```shell
219219
npm install --global gatsby-cli
220220
```
221221

222222
#### Generate a Gatsby project
223223

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

226-
```bash
226+
```shell
227227
gatsby new blog
228228
```
229229

230230
#### Start in development mode
231231

232232
Enter in your project's folder:
233233

234-
```bash
234+
```shell
235235
cd blog
236236
```
237237

238238
Start the server:
239239

240-
```bash
240+
```shell
241241
gatsby develop
242242
```
243243

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

256256
Let's install it:
257257

258-
```bash
258+
```shell
259259
npm install --save gatsby-source-strapi
260260
```
261261

docs/blog/2018-11-05-deploying-gatsby-to-azure/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ To complete this tutorial you will need the following tools:
2121

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

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

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

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

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

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

6262
You can now view your website by running
6363

64-
```bash
64+
```shell
6565
cd azure-blog
6666
npm run develop
6767
```
@@ -113,7 +113,7 @@ Change the option to `enabled`, set a default document name of `index.html` and
113113

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

116-
```bash
116+
```shell
117117
gatsby build
118118

119119
success open and validate gatsby-config — 0.010 s

docs/blog/2019-11-21-how-to-convert-an-existing-gatsby-blog-to-use-mdx/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ It can be a big tricky to add MDX to an existing blog. The following 5 steps wil
2121

2222
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.
2323

24-
```bash
24+
```shell
2525
gatsby new my-blog-starter https://github.com/gatsbyjs/gatsby-starter-blog
2626
```
2727

2828
### Step 1
2929

3030
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`.
3131

32-
```bash
32+
```shell
3333
npm install --save gatsby-plugin-mdx gatsby-plugin-feed-mdx @mdx-js/mdx @mdx-js/react
3434
```
3535

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

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

105-
```bash
105+
```shell
106106
npm uninstall --save gatsby-transformer-remark gatsby-plugin-feed
107107
```
108108

docs/blog/2019-12-20-integrate-tinacms-with-your-gatsby-website/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Want to see a more advanced example of TinaCMS integrated with a Gatsby website?
2424

2525
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.
2626

27-
```bash
27+
```shell
2828
gatsby new tina-tutorial https://github.com/gatsbyjs/gatsby-starter-blog
2929
cd tina-tutorial
3030
```
@@ -33,7 +33,7 @@ cd tina-tutorial
3333

3434
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.
3535

36-
```bash
36+
```shell
3737
yarn add gatsby-plugin-tinacms gatsby-tinacms-remark gatsby-tinacms-git styled-components
3838
```
3939

docs/blog/2020-01-08-git-workflows/index.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@ In this alternative flow, we're _leveraging_ Git to show us what work needs to b
105105

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

108-
```bash
108+
```shell
109109
# stage all the changes we just made
110-
$ git add .
110+
git add .
111111

112112
# wrap up the rebase
113-
$ git rebase --continue
113+
git rebase --continue
114114
```
115115

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

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

132-
```bash
133-
$ git push origin feat/headless-cms-pt2 -f
132+
```shell
133+
git push origin feat/headless-cms-pt2 -f
134134
```
135135

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

229229
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):
230230

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

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

245-
```bash
245+
```shell
246246
# Update our local state
247-
$ git checkout master
248-
$ git pull origin master
247+
git checkout master
248+
git pull origin master
249249

250250
# Rebase our root branch
251-
$ git checkout feat/headless-cms
252-
$ git rebase master
251+
git checkout feat/headless-cms
252+
git rebase master
253253

254254
# Continue down the chain
255-
$ git checkout feat/headless-cms-pt2
256-
$ git rebase feat/headless-cms
255+
git checkout feat/headless-cms-pt2
256+
git rebase feat/headless-cms
257257
```
258258

259259
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.

0 commit comments

Comments
 (0)