Skip to content

Commit 0890a5c

Browse files
committed
chore: Update READMEs for better instructions
1 parent 48a64f6 commit 0890a5c

File tree

17 files changed

+71
-54
lines changed

17 files changed

+71
-54
lines changed

packages/gatsby-codemods/README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
## gatsby-codemods
1+
# gatsby-codemods
22

33
A collection of codemod scripts for use with [JSCodeshift](https://github.com/facebook/jscodeshift) that help migrate to newer versions of Gatsby.
44

55
> **Note:** Codemods are designed to rewrite your project's files. Ensure you have a backup before going any further.
66
7-
### Setup & Run
7+
## Setup & Run
88

99
There are two ways to run codemods on this package.
1010

@@ -49,9 +49,9 @@ Structure of a jscodeshift call:
4949
- use the `--extensions` option if your files have different extensions than `.js` (for example, `--extensions js,jsx`)
5050
- see all available [jscodeshift options](https://github.com/facebook/jscodeshift#usage-cli).
5151

52-
### Included scripts
52+
## Included scripts
5353

54-
#### `global-graphql-calls`
54+
### `global-graphql-calls`
5555

5656
Add a `graphql` import to modules that use the `graphql` tag function without an import. This was supported in Gatsby v1 and deprecated for Gatsby v2.
5757

@@ -82,7 +82,7 @@ export const query = graphql`
8282
`
8383
```
8484

85-
#### `import-link`
85+
### `import-link`
8686

8787
Import `Link` from `gatsby` instead of `gatsby-link` and remove the `gatsby-link` import.
8888

@@ -103,7 +103,7 @@ export default props => (
103103
)
104104
```
105105

106-
#### `navigate-calls`
106+
### `navigate-calls`
107107

108108
Change the deprecated `navigateTo` method from `gatsby-link` to `navigate` from the `gatsby` module.
109109

@@ -128,7 +128,7 @@ export default props => (
128128
)
129129
```
130130

131-
#### `rename-bound-action-creators`
131+
### `rename-bound-action-creators`
132132

133133
Rename `boundActionCreators` to `actions`. `boundActionCreators` has been deprecated in Gatsby v2
134134

@@ -158,7 +158,7 @@ Example result:
158158
}
159159
```
160160

161-
### More scripts
161+
## More scripts
162162

163163
Check out [issue 5038 in the Gatsby repo for additional codemod ideas](https://github.com/gatsbyjs/gatsby/issues/5038#issuecomment-411516865).
164164

packages/gatsby-design-tokens/README.md

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
<img src="https://user-images.githubusercontent.com/21834/74070062-35b91980-4a00-11ea-93a8-b77bde7b4c37.png" width="48" height="48" alt="rebeccapurple dot" />
2-
<br>
3-
<br>
4-
51
# gatsby-design-tokens
62

73
<a href="https://www.npmjs.org/package/gatsby-design-tokens">

packages/gatsby-plugin-flow/README.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@ Provides drop-in support for Flow by adding `@babel/preset-flow`.
44

55
## Install
66

7-
`npm install gatsby-plugin-flow`
7+
```shell
8+
npm install gatsby-plugin-flow
9+
```
810

911
## How to use
1012

11-
1. Include the plugin in your `gatsby-config.js` file.
12-
1. You're good to go.
13-
14-
`gatsby-config.js`
13+
Add the plugin to your `gatsby-config.js` file:
1514

1615
```javascript
17-
plugins: [`gatsby-plugin-flow`]
16+
// In your gatsby-config.js
17+
module.exports = {
18+
plugins: [`gatsby-plugin-flow`],
19+
}
1820
```

packages/gatsby-plugin-google-analytics/README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
Easily add Google Analytics to your Gatsby site.
44

5-
## Upgrade note
5+
## Deprecation Notice
66

77
This plugin uses Google's `analytics.js` file under the hood. Google has a [guide recommending users upgrade to `gtag.js` instead](https://developers.google.com/analytics/devguides/collection/upgrade/analyticsjs). There is another plugin [`gatsby-plugin-gtag`](https://gatsbyjs.com/plugins/gatsby-plugin-google-gtag/) which uses `gtag.js` and we recommend it.
88

99
## Install
1010

11-
`npm install gatsby-plugin-google-analytics`
11+
```shell
12+
npm install gatsby-plugin-google-analytics
13+
```
1214

1315
## How to use
1416

packages/gatsby-plugin-google-gtag/README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ For more general information on gtag you can read Google's official documentatio
1010

1111
If you're migrating from analytics.js (gatsby-plugin-google-analytics) you can read about the subtle API differences in more depth at: https://developers.google.com/analytics/devguides/migration/ua/analyticsjs-to-gtagjs.
1212

13-
NOTE: This plugin only works in production mode! To test your Global Site Tag is installed and firing events correctly run: `gatsby build && gatsby serve.`
13+
**Please note:** This plugin only works in production mode! To test your Global Site Tag is installed and firing events correctly run: `gatsby build && gatsby serve.`
1414

1515
## Install
1616

17-
`npm install gatsby-plugin-google-gtag`
17+
```shell
18+
npm install gatsby-plugin-google-gtag
19+
```
1820

1921
## How to use
2022

packages/gatsby-plugin-sitemap/README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
Create a sitemap for your Gatsby site.
44

5-
_NOTE: This plugin only generates output when run in `production` mode! To test your sitemap, run: `gatsby build && gatsby serve`_
5+
**Please note:** This plugin only generates output when run in `production` mode! To test your sitemap, run: `gatsby build && gatsby serve`.
66

77
## Install
88

9-
`npm install gatsby-plugin-sitemap`
9+
```shell
10+
npm install gatsby-plugin-sitemap
11+
```
1012

1113
## How to Use
1214

packages/gatsby-plugin-styled-components/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ built-in server-side rendering support.
66

77
## Install
88

9-
`npm install gatsby-plugin-styled-components styled-components babel-plugin-styled-components`
9+
```shell
10+
npm install gatsby-plugin-styled-components styled-components babel-plugin-styled-components
11+
```
1012

1113
## How to use
1214

packages/gatsby-plugin-typography/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ A Gatsby plugin for utilizing the [Typography](https://kyleamathews.github.io/ty
44

55
## Install
66

7-
`npm install gatsby-plugin-typography react-typography typography`
7+
```shell
8+
npm install gatsby-plugin-typography react-typography typography
9+
```
810

911
## Why to use
1012

packages/gatsby-remark-images/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ In the processing, it makes images responsive by:
1515

1616
## Install
1717

18-
`npm install gatsby-remark-images gatsby-plugin-sharp`
18+
```shell
19+
npm install gatsby-remark-images gatsby-plugin-sharp
20+
```
1921

2022
## How to use
2123

packages/gatsby-remark-katex/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55

66
## Install
77

8-
`npm install gatsby-transformer-remark gatsby-remark-katex katex`
8+
```shell
9+
npm install gatsby-transformer-remark gatsby-remark-katex katex
10+
```
911

1012
## How to use
1113

packages/gatsby-source-contentful/README.md

-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
# gatsby-source-contentful
22

3-
> Source plugin for pulling content types, entries, and assets into Gatsby from
4-
> Contentful spaces. It creates links between entry types and asset so they can be
5-
> queried in Gatsby using GraphQL.
6-
>
7-
> An example site for using this plugin is at https://using-contentful.gatsbyjs.org/
8-
93
<details>
104
<summary><strong>Table of contents</strong></summary>
115

packages/gatsby-source-faker/README.md

+18-15
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,33 @@
22

33
This is a plugin that allows you to use [faker.js](https://github.com/marak/Faker.js/) to generate fake data for Gatsby sites. This could come in handy for creating example sites, documentation, or just to experiment with Gatsby.
44

5-
## How to use it
6-
7-
Install `gatsby-source-faker`
5+
## Installation
86

97
```shell
108
npm install gatsby-source-faker
119
```
1210

13-
Add `gatsby-source-faker` to the `gatsby-config.js` as follows
11+
## How to use it
12+
13+
Add `gatsby-source-faker` to the `gatsby-config.js` as following:
1414

1515
```javascript
16-
plugins: [
17-
{
18-
resolve: `gatsby-source-faker`,
19-
// derive schema from faker's options
20-
options: {
21-
schema: {
22-
name: ["firstName", "lastName"],
16+
// In your gatsby-config.js
17+
module.exports = {
18+
plugins: [
19+
{
20+
resolve: `gatsby-source-faker`,
21+
// derive schema from faker's options
22+
options: {
23+
schema: {
24+
name: ["firstName", "lastName"],
25+
},
26+
count: 3, // how many fake objects you need
27+
type: "NameData", // Name of the graphql query node
2328
},
24-
count: 3, // how many fake objects you need
25-
type: "NameData", // Name of the graphql query node
2629
},
27-
},
28-
]
30+
],
31+
}
2932
```
3033

3134
Example: [Using Faker](https://github.com/gatsbyjs/gatsby/tree/master/examples/using-faker)

packages/gatsby-source-mongodb/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
Source plugin for pulling data into Gatsby from MongoDB collections.
44

5+
## Installation
6+
7+
```shell
8+
npm install gatsby-source-mongodb
9+
```
10+
511
## How to use
612

713
```javascript

packages/gatsby-telemetry/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# gatsby-telemetry
22

3-
Check out: [gatsby.dev/telemetry](https://gatsby.dev/telemetry)
3+
Check out [gatsby.dev/telemetry](https://gatsby.dev/telemetry) for more information.
44

55
## API
66

packages/gatsby-transformer-asciidoc/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ Parses AsciiDoc files using [Asciidoctor.js](https://asciidoctor.org/docs/asciid
44

55
## Install
66

7-
`npm install gatsby-transformer-asciidoc`
7+
```shell
8+
npm install gatsby-transformer-asciidoc
9+
```
810

911
## How to use
1012

packages/gatsby-transformer-sharp/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ including resizing, cropping, and creating responsive images.
1010

1111
## Install
1212

13-
`npm install gatsby-transformer-sharp gatsby-plugin-sharp`
13+
```shell
14+
npm install gatsby-transformer-sharp gatsby-plugin-sharp
15+
```
1416

1517
## How to use
1618

packages/gatsby-transformer-sqip/README.md

-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222

2323
This project can create beautiful results, but this comes with the cost of processing power. It may take several seconds on your machine to generate the preview. **Make sure to invest some time and to cache your `public` folder to avoid regeneration of the previews on every build.**
2424

25-
Netlify users might use [gatsby-plugin-netlify-cache](https://github.com/axe312ger/gatsby-plugin-netlify-cache).
26-
2725
<details>
2826
<summary><strong>Table of contents:</strong></summary>
2927

0 commit comments

Comments
 (0)