Skip to content

Commit

Permalink
chore(docs): Remove non-inclusive language (#27252)
Browse files Browse the repository at this point in the history
  • Loading branch information
noahsb committed Oct 28, 2020
1 parent 1512a6f commit fcb22eb
Show file tree
Hide file tree
Showing 44 changed files with 63 additions and 64 deletions.
2 changes: 1 addition & 1 deletion docs/docs/graphql-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Gatsby will create a schema that looks something like this:
title: String
```
This makes it easy to pull data from anywhere and immediately start writing
This makes it possible to pull data from anywhere and immediately start writing
GraphQL queries against your data.
This _can_ cause confusion as some data sources allow you to define
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/graphql-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ In this query `filter` and the `ne` (not equals) operator is used to show only r
Gatsby relies on [Sift](https://www.npmjs.com/package/sift) to enable MongoDB-like query syntax for object filtering. This allows Gatsby to support operators like `eq`, `ne`, `in`, `regex` and querying nested fields through the `__` connector.

It is also possible to filter on multiple fields - just separate the individual filters by a comma (works as an AND):
It is also possible to filter on multiple fields by separating the individual filters by a comma (works as an AND):

```js
filter: { contentType: { in: ["post", "page"] }, draft: { eq: false } }
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/how-code-splitting-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ If the asset is CSS, you [inject it inline in the head](https://github.com/gatsb
#### Prefetching chunks
As shown above, Gatsby uses "preload" to speed up loading of resources required by the page. These are its CSS and its core JavaScript needed to run the page. But if you stopped there, then when a user clicked a link to another page, he would have to wait for that pages resources to download before showing it. To speed this up, once the current page has loaded, Gatsby looks for all links on the page, and for each starts prefetching the page that the link points to.
As shown above, Gatsby uses "preload" to speed up loading of resources required by the page. These are its CSS and its core JavaScript needed to run the page. But if you stopped there, then when a user clicked a link to another page, they would have to wait for that pages resources to download before showing it. To speed this up, once the current page has loaded, Gatsby looks for all links on the page, and for each starts prefetching the page that the link points to.
It does this using the `<link rel="prefetch" href="..." />` parameter. When the browser sees this tag, it will start downloading the resource but at an extremely low priority and only when the resources for the current page have finished loading. Check out the [MDN prefetch docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Link_prefetching_FAQ) for more.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/how-gatsby-works-with-github-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: How Gatsby Works with GitHub Pages
---

GitHub Pages is a service offered by GitHub that allows hosting for websites configured straight from the repository. A Gatsby site can be hosted on GitHub Pages with just a few configurations to the codebase and the repository's settings.
GitHub Pages is a service offered by GitHub that allows hosting for websites configured straight from the repository. A Gatsby site can be hosted on GitHub Pages with a few configurations to the codebase and the repository's settings.

You can publish your site on GitHub Pages several different ways:

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/html-generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ So, we've built the means to generate HTML for a page. This webpack bundle is sa

Page HTML does not depend on other pages. So we can perform this step in parallel. We use the [jest-worker](https://github.com/facebook/jest/tree/master/packages/jest-worker) library to make this easier. By default, the [render-html.ts](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/utils/worker/render-html.ts) creates a pool of workers equal to the number of physical cores on your machine. You can configure the number of pools by passing an optional environment variable, [`GATSBY_CPU_COUNT`](/docs/multi-core-builds). It then partitions the pages into groups and sends them to the workers, which run [worker](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/utils/worker).

The workers simply iterate over each page in their partition, and call the `render-page.js` with the page. It then saves the HTML for the page's path in `/public`.
The workers iterate over each page in their partition, and call the `render-page.js` with the page. It then saves the HTML for the page's path in `/public`.

Once all workers have finished, we're done!
2 changes: 1 addition & 1 deletion docs/docs/layout-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ In this guide, you'll learn Gatsby's approach to layouts, how to create and use

## Gatsby's approach to layouts

Gatsby does not, by default, automatically apply layouts to pages (there are, however, ways to do so which will be covered in a later section). Instead, Gatsby follows React's compositional model of importing and using components. This makes it possible to create multiple levels of layouts, e.g. a global header and footer, and then on some pages, a sidebar menu. It also makes it easy to pass data between layout and page components.
Gatsby does not, by default, automatically apply layouts to pages (there are, however, ways to do so which will be covered in a later section). Instead, Gatsby follows React's compositional model of importing and using components. This makes it possible to create multiple levels of layouts, e.g. a global header and footer, and then on some pages, a sidebar menu. It also makes it possible to pass data between layout and page components.

## What are layout components?

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/local-https.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Local HTTPS
---

Gatsby provides an easy way to use a local HTTPS server during development, thanks to [devcert](https://github.com/davewasmer/devcert). When you enable the `https` option, a private key and certificate file will be created for your project and used by the development server.
Gatsby provides a way to use a local HTTPS server during development, thanks to [devcert](https://github.com/davewasmer/devcert). When you enable the `https` option, a private key and certificate file will be created for your project and used by the development server.

## Usage (automatic HTTPS)

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/maintaining-a-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Every major version update should also be reflected in the README of the plugin

It would be great for users to be able to reference several versions of the plugin with the updated examples to see if they want to keep the current version or upgrade and also to understand what the new version offers. Although this is good:

- Try to not clog your release repository with older versions of the plugin as you update, as they’re not often needed. Instead, simply keep the last few in place.
- Try to not clog your release repository with older versions of the plugin as you update, as they’re not often needed. Instead, keep the last few in place.

- Try not to push every iterative change from Git live

Expand Down
3 changes: 1 addition & 2 deletions docs/docs/migrating-from-v0-to-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ with various JavaScript tooling (e.g.
[Prettier](https://github.com/prettier/prettier)) simpler.

Everything related to webpack, loaders, Babel, React should work nearly
identically under v1 of Gatsby compared to v0 so this part of the migration is
super easy.
identically under v1 of Gatsby compared to v0.

```shell
mkdir src
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/node-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ exports.createPages = (_, pluginOptions, cb) => {
}
```

If your plugin does not do async work, you can just return directly.
If your plugin does not do async work, you can return directly.

## Usage

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/node-creation.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ Any nodes that aren't touched by the end of the `source-nodes` phase, are delete

## Changing a node's fields

From a site developer's point of view, nodes are immutable. In the sense that if you simply change a node object, those changes will not be seen by other parts of Gatsby. To make a change to a node, it must be persisted to Redux via an action.
From a site developer's point of view, nodes are immutable. In the sense that if you change a node object, those changes will not be seen by other parts of Gatsby. To make a change to a node, it must be persisted to redux via an action.

So, how do you add a field to an existing node? E.g. perhaps in onCreateNode, you want to add a transformer specific field? You can call [createNodeField](/docs/actions/#createNodeField) and this will simply add your field to the node's `node.fields` object and then persists it to Redux. This can then be referenced by other parts of your plugin at later stages of the build.
So, how do you add a field to an existing node? E.g. perhaps in onCreateNode, you want to add a transformer specific field? You can call [createNodeField](/docs/actions/#createNodeField) and this will add your field to the node's `node.fields` object and then persists it to redux. This can then be referenced by other parts of your plugin at later stages of the build.

## Node Tracking

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/page-creation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The `pages` Redux namespace is a map of page `path` to page object. The [pages r

## Update components Redux namespace

The `components` Redux namespace is a map of [componentPath](/docs/behind-the-scenes-terminology/#component) (file with React component) to the Component object. A Component object is simply the Page object but with an empty query string (that will be set during [Query Extraction](/docs/query-extraction/#store-queries-in-redux)).
The `components` Redux namespace is a map of [componentPath](/docs/behind-the-scenes-terminology/#component) (file with React component) to the Component object. A Component object is the Page object but with an empty query string (that will be set during [Query Extraction](/docs/query-extraction/#store-queries-in-redux)).

## onCreatePage API

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/page-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {

### Mark up basic index page

A simple index page (`src/pages/index.js`) can be marked up like so:
An index page (`src/pages/index.js`) can be marked up like so:

```jsx:title=src/pages/index.js
import React from "react"
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/performance-tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ There are many OpenTracing compatible backends available. Below are examples of

The default tracing that comes with Gatsby can give you a good idea of which plugins or stages of the build are slowing down your site. But sometimes, you'll want to trace the internals of your site. Or if you're a plugin author, you might want to trace long operations.

To provide custom tracing, you can use the `tracing` object, which is present in the args passed to API implementers. This tracing object contains a function called `startSpan`. This simply wraps [OpenTracing startSpan](https://github.com/opentracing/opentracing-javascript/blob/master/src/tracer.ts#L79), but provides the default `childOf: parentSpan` span args. `startSpan` returns a span object that you must explicitly end by calling its `.finish()` method. For example:
To provide custom tracing, you can use the `tracing` object, which is present in the args passed to API implementers. This tracing object contains a function called `startSpan`. This wraps [OpenTracing startSpan](https://github.com/opentracing/opentracing-javascript/blob/master/src/tracer.ts#L79), but provides the default `childOf: parentSpan` span args. `startSpan` returns a span object that you must explicitly end by calling its `.finish()` method. For example:

```javascript:title=gatsby-node.js
exports.sourceNodes = async ({ actions, tracing }) => {
Expand All @@ -119,6 +119,6 @@ exports.sourceNodes = async ({ actions, tracing }) => {
}
```

With this span, you can perform any OpenTracing span operation such as [span.setTag](https://github.com/opentracing/opentracing-javascript/blob/master/src/span.ts#L89). Just make sure that the tracing backend supports these operations. You can provide an optional second span options argument to `startSpan` which will be passed to the underlying OpenTracing call.
With this span, you can perform any OpenTracing span operation such as [span.setTag](https://github.com/opentracing/opentracing-javascript/blob/master/src/span.ts#L89). Make sure that the tracing backend supports these operations. You can provide an optional second span options argument to `startSpan` which will be passed to the underlying OpenTracing call.

For advanced use cases, the `tracing` object also provides `tracer` and `parentSpan` fields. You can use these to construct independent spans, or your own child spans (see the [OpenTracing project](https://github.com/opentracing/opentracing-javascript/tree/master/src) for more info).
4 changes: 2 additions & 2 deletions docs/docs/plugins-themes-and-starters.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gatsby plugins are Node.js packages that implement Gatsby APIs and are commonly

A Gatsby theme is a type of plugin that includes a `gatsby-config.js` file and adds pre-configured functionality, data sourcing, and/or UI code to Gatsby sites. Since they are plugins, themes can be packaged and distributed through a registry like npm or yarn, and versions can be updated through a site's `package.json` file.

With a Gatsby theme, all of your default configuration (shared functionality, data sourcing, design) is abstracted out of your site and into an installable package. A theme might differ from a typical plugin in that it packages up usage of a plugin into a consumable API, making it easy to include functionality without having to type out all of the code by hand (such as GraphQL queries). To understand more of the motivation for Gatsby themes, check out the docs on [What are Gatsby Themes?](/docs/themes/what-are-gatsby-themes/)
With a Gatsby theme, all of your default configuration (shared functionality, data sourcing, design) is abstracted out of your site and into an installable package. A theme might differ from a typical plugin in that it packages up usage of a plugin into a consumable API, making it possible to include functionality without having to type out all of the code by hand (such as GraphQL queries). To understand more of the motivation for Gatsby themes, check out the docs on [What are Gatsby Themes?](/docs/themes/what-are-gatsby-themes/)

- [Themes docs](/docs/themes/)
- [Using a theme](/docs/themes/using-a-gatsby-theme/)
Expand Down Expand Up @@ -58,7 +58,7 @@ The following tables put plugins, themes, and starters side-by-side, showing wha

### Differences and considerations in maintenance

When it comes to maintaining a Gatsby site, plugins and themes offer a distinct advantage to starters by being distributed as packages. This means making changes in multiple Gatsby sites is as easy as a new install of an updated package upstream. It's difficult to sync changes across multiple sites derived from the same starter.
When it comes to maintaining a Gatsby site, plugins and themes offer a distinct advantage to starters by being distributed as packages. This means making changes in multiple Gatsby sites is done by a new install of an updated package upstream. It's difficult to sync changes across multiple sites derived from the same starter.

| Maintenance | Plugin | Theme | Starter |
| ------------------ | ------ | ----- | ------- |
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/porting-from-create-react-app-to-gatsby.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ After installation, the key things that need to change are:

2. converting routes into pages in the `/pages` directory

The following sections explain the above steps as well as other changes that you might need to make depending on the complexity of your app. A default Create React App project is able to run with just the above steps.
The following sections explain the above steps as well as other changes that you might need to make depending on the complexity of your app. A default Create React App project is able to run with the above steps.

### Project structure

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/post-css.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import "./styles.css"

### With CSS modules

Using CSS modules requires no additional configuration. Simply prepend `.module` to the extension. For example: `App.css -> App.module.css`. Any file with the module extension will use CSS modules.
To use CSS modules, prepend `.module` to the extension. For example: `App.css -> App.module.css`. Any file with the module extension will use CSS modules.

### PostCSS plugins

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/query-execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ digraph {

## Figuring out which queries need to be executed

The first thing this query does is figure out what queries even need to be run. You would think this would simply be a matter of running the Queries that were enqueued in [Extract Queries](/docs/query-extraction/), but matters are complicated by support for `develop`. Below is the logic for figuring out which queries need to be executed (code is in [runQueries()](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/internal-plugins/query-runner/page-query-runner.js#L36)).
The first thing this query does is figure out what queries need to be run. You might think this would be a matter of running the Queries that were enqueued in [Extract Queries](/docs/query-extraction/), but matters are complicated by support for `develop`. Below is the logic for figuring out which queries need to be executed (code is in [runQueries()](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/internal-plugins/query-runner/page-query-runner.js#L36)).

### Already queued queries

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/react-hydration.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The `hydrate()` method is called internally by Gatsby from `ReactDOM`, which acc
_**Note**: if you need to, the hydrate method can be replaced with a custom function by using the [`replaceHydrationFunction` Browser API](/docs/browser-apis/#replaceHydrateFunction)._

This means that the browser can "pick up" where the server left off with the contents created by Gatsby in the `/public` folder and render the site in the browser just like any other React app would. Since the data and structure of the pages is already written out, it's not necessary for Gatsby to go to another server asking for HTML or other data.
This means that the browser can "pick up" where the server left off with the contents created by Gatsby in the `/public` folder and render the site in the browser like any other React app would. Since the data and structure of the pages is already written out, it's not necessary for Gatsby to go to another server asking for HTML or other data.

## Transfer rendering to the React reconciler

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/recipes/gitlab-continuous-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ install_dependencies:

## Additional resources

- See how you can develop this simple file into something more real world [GitLab CI/CD Docs](https://docs.gitlab.com/ee/ci/README.html)
- See how you can develop this file into something more real world [GitLab CI/CD Docs](https://docs.gitlab.com/ee/ci/README.html)
- Check this especially to learn how to make your newly build available for a next job - [GitLab Job Artifacts Docs](https://docs.gitlab.com/ee/ci/pipelines/job_artifacts.html)

- [Getting started with GitLab CI/CD](https://gitlab.com/help/ci/quick_start/README)
2 changes: 1 addition & 1 deletion docs/docs/recipes/querying-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ Fragments can be nested inside other fragments, and multiple fragments can be us

### Additional resources

- [Simple example repo using fragments](https://github.com/gatsbyjs/gatsby/tree/master/examples/using-fragments)
- [Example repo using fragments](https://github.com/gatsbyjs/gatsby/tree/master/examples/using-fragments)
- [Gatsby GraphQL reference for fragments](/docs/graphql-reference/#fragments)
- [Gatsby image fragments](/docs/gatsby-image/#image-query-fragments)
- [Example repo with co-located data](https://github.com/gatsbyjs/gatsby/tree/master/examples/gatsbygram)
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Alternatively, your application may include functionality that cannot be handled

## Creating routes

Gatsby makes it easy to programmatically control your pages. Pages can be created in three ways:
Gatsby makes it possible to programmatically control your pages. Pages can be created in three ways:

- In your site's gatsby-node.js by implementing the API
[`createPages`](/docs/node-apis/#createPages)
Expand Down

0 comments on commit fcb22eb

Please sign in to comment.