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(readme): fix code blocks in recipes readme #24144

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions packages/gatsby-recipes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ You can browse the [source of the official recipes](https://github.com/gatsbyjs/

You can run built-in recipes, ones you write locally, and ones people have posted online.

To run a local recipe, make sure to start the path to the recipe with a period like `gatsby recipes ./my-cool-recipe.mdx`
To run a local recipe, make sure to start the path to the recipe with a period like:

```shell
gatsby recipes ./my-cool-recipe.mdx
```

To run a remote recipe, copy the path to the recipe and run it e.g.

Expand Down Expand Up @@ -160,7 +164,9 @@ Installs a Gatsby Plugin in the site's `gatsby-config.js`.

### `<NPMPackage>`

`<NPMPackage name="lodash" version="latest" />`
```jsx
<NPMPackage name="lodash" version="latest" />
```

#### props

Expand All @@ -170,7 +176,9 @@ Installs a Gatsby Plugin in the site's `gatsby-config.js`.

### `<NPMScript>`

`<NPMScript name="test" command="jest" />`
```jsx
<NPMScript name="test" command="jest" />
```

#### props

Expand All @@ -179,7 +187,12 @@ Installs a Gatsby Plugin in the site's `gatsby-config.js`.

### `<File>`

<File path="test.md" content="https://raw.githubusercontent.com/KyleAMathews/test-recipes/master/gatsby-recipe-jest.mdx" />
```jsx
<File
path="test.md"
content="https://raw.githubusercontent.com/KyleAMathews/test-recipes/master/gatsby-recipe-jest.mdx"
/>
```

#### props

Expand All @@ -200,7 +213,7 @@ If you want to fix a bug in a resource or extend it in some way, typically you'l

In your terminal, start a jest watch process against the resource you're working on e.g. for GatsbyPlugin:

```bash
```shell
GATSBY_RECIPES_NO_COLOR=true jest --testPathPattern "src/.*plugin.test" --watch
```

Expand Down