From 6b6b2f2ece23d356f6f1501f09bfaa8284410efa Mon Sep 17 00:00:00 2001 From: Muescha <184316+muescha@users.noreply.github.com> Date: Mon, 22 Jun 2020 16:12:10 +0200 Subject: [PATCH] fix(docs): change bash to shell in code language blocks (#22899) Co-authored-by: Lennart Co-authored-by: gatsbybot --- .../index.md | 2 +- .../index.md | 6 ++-- .../index.md | 6 ++-- .../index.md | 6 ++-- .../index.md | 12 ++++---- .../blog/2018-1-18-strapi-and-gatsby/index.md | 20 ++++++------- .../index.md | 10 +++---- .../index.md | 6 ++-- .../index.md | 4 +-- docs/blog/2020-01-08-git-workflows/index.md | 30 +++++++++---------- docs/blog/gatsbygram-case-study/index.md | 2 +- ...sting-with-google-analytics-and-netlify.md | 4 +-- docs/docs/conditional-page-builds.md | 2 +- docs/docs/end-to-end-testing.md | 2 +- docs/docs/gatsby-image.md | 2 +- .../sourcing-content-from-json-or-yaml.md | 4 +-- docs/docs/sourcing-from-etsy.md | 2 +- docs/docs/sourcing-from-woocommerce.md | 2 +- docs/docs/using-client-side-only-packages.md | 4 +-- docs/tutorial/gatsby-image-tutorial/index.md | 4 +-- examples/using-path-prefix/README.md | 2 +- .../2018-01-27---custom-components/index.md | 2 +- .../babel-preset-gatsby-package/README.md | 2 +- packages/babel-preset-gatsby/README.md | 2 +- packages/gatsby-cli/README.md | 8 ++--- packages/gatsby-cypress/README.md | 2 +- packages/gatsby-design-tokens/README.md | 8 ++--- packages/gatsby-image/README.md | 2 +- packages/gatsby-plugin-offline/README.md | 2 +- packages/gatsby-remark-prismjs/README.md | 6 ++-- 30 files changed, 83 insertions(+), 83 deletions(-) diff --git a/docs/blog/2017-02-21-1-0-progress-update-where-came-from-where-going/index.md b/docs/blog/2017-02-21-1-0-progress-update-where-came-from-where-going/index.md index 75dd2b6a14565..83246f9c8532e 100644 --- a/docs/blog/2017-02-21-1-0-progress-update-where-came-from-where-going/index.md +++ b/docs/blog/2017-02-21-1-0-progress-update-where-came-from-where-going/index.md @@ -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 ``` diff --git a/docs/blog/2017-07-19-creating-a-blog-with-gatsby/index.md b/docs/blog/2017-07-19-creating-a-blog-with-gatsby/index.md index a35311b831085..5cf2415c3b86e 100644 --- a/docs/blog/2017-07-19-creating-a-blog-with-gatsby/index.md +++ b/docs/blog/2017-07-19-creating-a-blog-with-gatsby/index.md @@ -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 ``` @@ -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 ``` @@ -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 ``` diff --git a/docs/blog/2017-10-01-migrating-my-blog-from-hexo-to-gatsby/index.md b/docs/blog/2017-10-01-migrating-my-blog-from-hexo-to-gatsby/index.md index 76209af892304..fe6edbb5b44da 100644 --- a/docs/blog/2017-10-01-migrating-my-blog-from-hexo-to-gatsby/index.md +++ b/docs/blog/2017-10-01-migrating-my-blog-from-hexo-to-gatsby/index.md @@ -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 ``` @@ -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 ``` @@ -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 ``` diff --git a/docs/blog/2018-04-04-gatsby-contentful-starter-tutorial/index.md b/docs/blog/2018-04-04-gatsby-contentful-starter-tutorial/index.md index 78bb1784b43ac..5afb5f5aaac1c 100644 --- a/docs/blog/2018-04-04-gatsby-contentful-starter-tutorial/index.md +++ b/docs/blog/2018-04-04-gatsby-contentful-starter-tutorial/index.md @@ -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 ``` diff --git a/docs/blog/2018-06-07-build-a-gatsby-blog-using-the-cosmic-js-source-plugin/index.md b/docs/blog/2018-06-07-build-a-gatsby-blog-using-the-cosmic-js-source-plugin/index.md index 9747b29308cec..e2ad311992dbb 100644 --- a/docs/blog/2018-06-07-build-a-gatsby-blog-using-the-cosmic-js-source-plugin/index.md +++ b/docs/blog/2018-06-07-build-a-gatsby-blog-using-the-cosmic-js-source-plugin/index.md @@ -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 ``` @@ -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 ``` diff --git a/docs/blog/2018-1-18-strapi-and-gatsby/index.md b/docs/blog/2018-1-18-strapi-and-gatsby/index.md index ecc5d74aebbbe..4c3877fef6f6d 100644 --- a/docs/blog/2018-1-18-strapi-and-gatsby/index.md +++ b/docs/blog/2018-1-18-strapi-and-gatsby/index.md @@ -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 ``` @@ -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 ``` @@ -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 ``` @@ -215,7 +215,7 @@ _Important links from Video:_ First, install Gatsby CLI: -```bash +```shell npm install --global gatsby-cli ``` @@ -223,7 +223,7 @@ npm install --global gatsby-cli In the folder `tutorial` that you previously created, generate your brand new blog: -```bash +```shell gatsby new blog ``` @@ -231,13 +231,13 @@ gatsby new blog Enter in your project's folder: -```bash +```shell cd blog ``` Start the server: -```bash +```shell gatsby develop ``` @@ -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 ``` diff --git a/docs/blog/2018-11-05-deploying-gatsby-to-azure/index.md b/docs/blog/2018-11-05-deploying-gatsby-to-azure/index.md index 176f56575441e..55a1fa152fad3 100644 --- a/docs/blog/2018-11-05-deploying-gatsby-to-azure/index.md +++ b/docs/blog/2018-11-05-deploying-gatsby-to-azure/index.md @@ -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 ``` @@ -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 @@ -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 @@ -61,7 +61,7 @@ info Installing packages... You can now view your website by running -```bash +```shell cd azure-blog npm run develop ``` @@ -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 diff --git a/docs/blog/2019-11-21-how-to-convert-an-existing-gatsby-blog-to-use-mdx/index.md b/docs/blog/2019-11-21-how-to-convert-an-existing-gatsby-blog-to-use-mdx/index.md index d98cfa9d3dea6..076590890c254 100644 --- a/docs/blog/2019-11-21-how-to-convert-an-existing-gatsby-blog-to-use-mdx/index.md +++ b/docs/blog/2019-11-21-how-to-convert-an-existing-gatsby-blog-to-use-mdx/index.md @@ -21,7 +21,7 @@ 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 ``` @@ -29,7 +29,7 @@ gatsby new my-blog-starter https://github.com/gatsbyjs/gatsby-starter-blog 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 ``` @@ -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 ``` diff --git a/docs/blog/2019-12-20-integrate-tinacms-with-your-gatsby-website/index.md b/docs/blog/2019-12-20-integrate-tinacms-with-your-gatsby-website/index.md index dac18fd60477c..d3c18d4c3dcb8 100644 --- a/docs/blog/2019-12-20-integrate-tinacms-with-your-gatsby-website/index.md +++ b/docs/blog/2019-12-20-integrate-tinacms-with-your-gatsby-website/index.md @@ -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 ``` @@ -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 ``` diff --git a/docs/blog/2020-01-08-git-workflows/index.md b/docs/blog/2020-01-08-git-workflows/index.md index 410518a417b08..19d6971f8c64e 100644 --- a/docs/blog/2020-01-08-git-workflows/index.md +++ b/docs/blog/2020-01-08-git-workflows/index.md @@ -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: @@ -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 @@ -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. @@ -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. diff --git a/docs/blog/gatsbygram-case-study/index.md b/docs/blog/gatsbygram-case-study/index.md index 52de43cbbda8e..d3dd56947eec4 100644 --- a/docs/blog/gatsbygram-case-study/index.md +++ b/docs/blog/gatsbygram-case-study/index.md @@ -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 diff --git a/docs/docs/ab-testing-with-google-analytics-and-netlify.md b/docs/docs/ab-testing-with-google-analytics-and-netlify.md index 3d31ee70196af..662067f6cc5f4 100644 --- a/docs/docs/ab-testing-with-google-analytics-and-netlify.md +++ b/docs/docs/ab-testing-with-google-analytics-and-netlify.md @@ -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] @@ -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 ``` diff --git a/docs/docs/conditional-page-builds.md b/docs/docs/conditional-page-builds.md index 9c3b67fb09ae9..d52730a0dcc22 100644 --- a/docs/docs/conditional-page-builds.md +++ b/docs/docs/conditional-page-builds.md @@ -22,7 +22,7 @@ To list the paths in the build assets (`public`) folder, you can use one (or bot - `--log-pages` parameter will output all the file paths that were updated or deleted at the end of the build stage. -```bash +```shell success Building production JavaScript and CSS bundles - 82.198s success run queries - 82.762s - 4/4 0.05/s success Building static HTML for pages - 19.386s - 2/2 0.10/s diff --git a/docs/docs/end-to-end-testing.md b/docs/docs/end-to-end-testing.md index 0561ccc4c19ce..e4f7e90c2fdbe 100644 --- a/docs/docs/end-to-end-testing.md +++ b/docs/docs/end-to-end-testing.md @@ -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 ``` diff --git a/docs/docs/gatsby-image.md b/docs/docs/gatsby-image.md index 2feb94efc0672..b8f9b67b626a1 100644 --- a/docs/docs/gatsby-image.md +++ b/docs/docs/gatsby-image.md @@ -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 ``` diff --git a/docs/docs/sourcing-content-from-json-or-yaml.md b/docs/docs/sourcing-content-from-json-or-yaml.md index 53d183e98fa3e..982f9e9f24a9c 100644 --- a/docs/docs/sourcing-content-from-json-or-yaml.md +++ b/docs/docs/sourcing-content-from-json-or-yaml.md @@ -8,7 +8,7 @@ To follow along with the JSON or YAML data sourcing tips outlined in this guide, Open up a terminal and run the following command: -```bash +```shell gatsby new gatsby-YAML-JSON-at-buildtime https://github.com/gatsbyjs/gatsby-starter-hello-world ``` @@ -132,7 +132,7 @@ For this example, you will need to add an extra dependency so that the file cont Open your terminal, navigate to the folder containing the Gatsby site, and issue the following command: -```bash +```shell npm install --save js-yaml ``` diff --git a/docs/docs/sourcing-from-etsy.md b/docs/docs/sourcing-from-etsy.md index f113ff76b4fee..a18275bf8689b 100644 --- a/docs/docs/sourcing-from-etsy.md +++ b/docs/docs/sourcing-from-etsy.md @@ -18,7 +18,7 @@ Note that Etsy expects developers to test the API using real data. That means yo You can use the [`gatsby-source-etsy`](/packages/gatsby-source-etsy/) plugin to pull featured listings and images from your Etsy shop into your Gatsby site. To install it, run: -```bash +```shell npm install gatsby-source-etsy ``` diff --git a/docs/docs/sourcing-from-woocommerce.md b/docs/docs/sourcing-from-woocommerce.md index 837a327722fc5..5892e293b390c 100644 --- a/docs/docs/sourcing-from-woocommerce.md +++ b/docs/docs/sourcing-from-woocommerce.md @@ -16,7 +16,7 @@ This guide assumes the use of the [`gatsby-source-woocommerce` plugin](/packages Install it: -```bash +```shell npm install --save @pasdo501/gatsby-source-woocommerce ``` diff --git a/docs/docs/using-client-side-only-packages.md b/docs/docs/using-client-side-only-packages.md index eabaf46ae3c52..ce7e12af28303 100644 --- a/docs/docs/using-client-side-only-packages.md +++ b/docs/docs/using-client-side-only-packages.md @@ -6,7 +6,7 @@ On occasion, you may need to use a function or library that only works client-si You'll need to use one of the workarounds outlined below if your project fails to compile with `gatsby develop` or `gatsby build` with an error like: -```bash +```shell Reference error: Window is not Defined ``` @@ -54,7 +54,7 @@ class MyComponent extends Component { Install [loadable-components](https://github.com/smooth-code/loadable-components) and use it as a wrapper for a component that wants to use a client-side only package. -```bash +```shell npm install @loadable/component # or use yarn yarn add @loadable/component diff --git a/docs/tutorial/gatsby-image-tutorial/index.md b/docs/tutorial/gatsby-image-tutorial/index.md index bf6874abeadbf..074e5efe0cee1 100644 --- a/docs/tutorial/gatsby-image-tutorial/index.md +++ b/docs/tutorial/gatsby-image-tutorial/index.md @@ -27,7 +27,7 @@ Image optimization in Gatsby is provided by a plugin called `gatsby-image` which Start by using npm to install the `gatsby-image` plugin and its associated dependencies. -```bash +```shell npm install gatsby-image gatsby-transformer-sharp gatsby-plugin-sharp ``` @@ -53,7 +53,7 @@ If you haven't already, make sure that your project is set up to see content ins 1. Install `gatsby-source-filesystem`. Note: If you created your project using `gatsby new `, this first step should already be done for you via the default starter. -```bash +```shell npm install gatsby-source-filesystem ``` diff --git a/examples/using-path-prefix/README.md b/examples/using-path-prefix/README.md index 74bd1c713e758..63cadaa0ff1cf 100644 --- a/examples/using-path-prefix/README.md +++ b/examples/using-path-prefix/README.md @@ -2,7 +2,7 @@ To test this example site locally run the following commands from this directory -```bash +```shell gatsby build --prefix-paths cd public mkdir prefix diff --git a/examples/using-remark/src/pages/2018-01-27---custom-components/index.md b/examples/using-remark/src/pages/2018-01-27---custom-components/index.md index 04634d6f7f241..4b66b838540fc 100644 --- a/examples/using-remark/src/pages/2018-01-27---custom-components/index.md +++ b/examples/using-remark/src/pages/2018-01-27---custom-components/index.md @@ -69,7 +69,7 @@ In order to display this component within a Markdown file, you'll need to add a 1. Install `rehype-react` as a dependency - ```bash + ```shell # If you use Yarn yarn add rehype-react diff --git a/packages/babel-preset-gatsby-package/README.md b/packages/babel-preset-gatsby-package/README.md index dc0978e8157a8..ad1f701586247 100644 --- a/packages/babel-preset-gatsby-package/README.md +++ b/packages/babel-preset-gatsby-package/README.md @@ -15,7 +15,7 @@ This [Babel](https://babeljs.io/) preset is used for our internal packages. If y Install `babel-preset-gatsby-package` and add a `.babelrc` file with the following content to the root of your project: -```bash +```shell npm install --dev babel-preset-gatsby-package ``` diff --git a/packages/babel-preset-gatsby/README.md b/packages/babel-preset-gatsby/README.md index e5f47e8d417c2..2c7f4fd863c4d 100644 --- a/packages/babel-preset-gatsby/README.md +++ b/packages/babel-preset-gatsby/README.md @@ -21,7 +21,7 @@ For more information on how to customize the Babel configuration of your Gatsby Install `babel-preset-gatsby` and add a `.babelrc` file with the following content to the root of your project: -```bash +```shell npm install --dev babel-preset-gatsby ``` diff --git a/packages/gatsby-cli/README.md b/packages/gatsby-cli/README.md index 9c0cc20eb0e29..292575dfa0e17 100644 --- a/packages/gatsby-cli/README.md +++ b/packages/gatsby-cli/README.md @@ -32,7 +32,7 @@ You can also use the `package.json` script variant of these commands, typically ### `new` -```bash +```shell gatsby new [ []] ``` @@ -47,19 +47,19 @@ gatsby new [ []] - Create a Gatsby site named `my-awesome-site`, using the [default starter](https://github.com/gatsbyjs/gatsby-starter-default): -```bash +```shell gatsby new my-awesome-site ``` - Create a Gatsby site named `my-awesome-blog-site`, using [gatsby-starter-blog](https://www.gatsbyjs.org/starters/gatsbyjs/gatsby-starter-blog/): -```bash +```shell gatsby new my-awesome-blog-site https://github.com/gatsbyjs/gatsby-starter-blog ``` - If you leave out both of the arguments, the CLI will run an interactive shell asking for these inputs: -```bash +```shell gatsby new ? What is your project called? › my-gatsby-project ? What starter would you like to use? › - Use arrow-keys. Return to submit. diff --git a/packages/gatsby-cypress/README.md b/packages/gatsby-cypress/README.md index b0a34d422c67b..f9349aa0454f1 100644 --- a/packages/gatsby-cypress/README.md +++ b/packages/gatsby-cypress/README.md @@ -6,7 +6,7 @@ This package provides additional [Cypress](https://cypress.io/) commands for [te To use these commands, first install the necessary packages: -```bash +```shell npm install cypress gatsby-cypress start-server-and-test --save-dev ``` diff --git a/packages/gatsby-design-tokens/README.md b/packages/gatsby-design-tokens/README.md index 6300a78803aab..f37333013c4a5 100644 --- a/packages/gatsby-design-tokens/README.md +++ b/packages/gatsby-design-tokens/README.md @@ -177,7 +177,7 @@ The Gatsby monorepo, which hosts this package, also contains the source for gats Follow the [official guide](https://www.gatsbyjs.org/contributing/setting-up-your-local-dev-environment/#fork-clone-and-branch-the-repository) to clone/fork and set up the Gatsby monorepo. This will roughly look like this: -```bash +```shell # clone the repo/your fork git clone https://github.com/gatsbyjs/gatsby.git cd gatsby @@ -196,19 +196,19 @@ git checkout -b topics/new-feature-name Assuming `gatsby-cli` [is installed](https://www.gatsbyjs.org/contributing/setting-up-your-local-dev-environment/#gatsby-functional-changes), let's install [`gatsby-dev-cli`](<(https://www.npmjs.com/package/gatsby-dev-cli)>) with -```bash +```shell yarn global add gatsby-dev-cli ``` `gatsby-dev-cli` needs to know where your local Gatsby repository lives; navigate to its root folder, get the absolute path to it via `pwd`, and tell `gatsby-dev-cli` about it with -```bash +```shell gatsby-dev --set-path-to-repo /path-to-local-gatsby/gatsby ``` ### 2. Get `www` running on `localhost` -```bash +```shell cd /path-to-local-gatsby/gatsby/www yarn # to install dependencies diff --git a/packages/gatsby-image/README.md b/packages/gatsby-image/README.md index 9a23d6e726d35..337316257feb5 100644 --- a/packages/gatsby-image/README.md +++ b/packages/gatsby-image/README.md @@ -84,7 +84,7 @@ effect as well as lazy loading of images further down the screen. Depending on the gatsby starter you used, you may need to include [gatsby-transformer-sharp](/packages/gatsby-transformer-sharp/) and [gatsby-plugin-sharp](/packages/gatsby-plugin-sharp/) as well, and make sure they are installed and included in your gatsby-config. -```bash +```shell npm install --save gatsby-transformer-sharp gatsby-plugin-sharp ``` diff --git a/packages/gatsby-plugin-offline/README.md b/packages/gatsby-plugin-offline/README.md index 93b741ab0274d..37b3d024298b8 100644 --- a/packages/gatsby-plugin-offline/README.md +++ b/packages/gatsby-plugin-offline/README.md @@ -172,7 +172,7 @@ If you want to remove `gatsby-plugin-offline` from your site at a later point, substitute it with [`gatsby-plugin-remove-serviceworker`](https://www.npmjs.com/package/gatsby-plugin-remove-serviceworker) to safely remove the service worker. First, install the new package: -```bash +```shell npm install gatsby-plugin-remove-serviceworker npm uninstall gatsby-plugin-offline ``` diff --git a/packages/gatsby-remark-prismjs/README.md b/packages/gatsby-remark-prismjs/README.md index fdf5e134a7dc7..8f7c0c46a12eb 100644 --- a/packages/gatsby-remark-prismjs/README.md +++ b/packages/gatsby-remark-prismjs/README.md @@ -373,21 +373,21 @@ plugins: [ ### Shell prompt -To show fancy prompts next to shell commands (only triggers on `bash`), either set `prompt.global` to `true` in `gatsby-config.js`, +To show fancy prompts next to shell commands (only triggers on `bash` and `shell`), either set `prompt.global` to `true` in `gatsby-config.js`, or pass at least one of `{outputLines: }`, `{promptUser: }`, or `{promptHost: }` to a snippet By default, every line gets a prompt appended to the start, this behaviour can be changed by specifying `{outputLines: }` to the language. ```` -```bash{outputLines: 2-10,12} +```shell{outputLines: 2-10,12} ```` The user and host used in the appended prompt is pulled from the `prompt.user` and `prompt.host` values, unless explicitly overridden by the `promptUser` and `promptHost` options in the snippet, e.g.: ```` -```bash{promptUser: alice}{promptHost: dev.localhost} +```shell{promptUser: alice}{promptHost: dev.localhost} ```` ### Line hiding