Skip to content

Commit b3ee03f

Browse files
Cecile-LebleuKyleAMathews
authored andcommitted
Minor text modifications for clarity (#17044)
Add extra space to separate paragraphs, add missing punctuation, replace unnecessary uppercase character for lowercase
1 parent 6312d48 commit b3ee03f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/tutorial/part-four/index.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ Now you can start querying 😋
212212
213213
When building sites, you'll probably want to reuse common bits of data -- like the _site title_ for example. Look at the `/about/` page. You'll notice that you have the site title (`Pandas Eating Lots`) in both the layout component (the site header) as well as in the `<h1 />` of the `about.js` page (the page header).
214214
215-
But what if you want to change the site title in the future? You'd have to search for the title across all your components and edit each instance. This is both cumbersome and error-prone, especially for larger, more complex sites. Instead, you can store the title in one location and reference that location from other files; Change the title in a single place, and Gatsby will _pull_ your updated title into files that reference it.
215+
But what if you want to change the site title in the future? You'd have to search for the title across all your components and edit each instance. This is both cumbersome and error-prone, especially for larger, more complex sites. Instead, you can store the title in one location and reference that location from other files; change the title in a single place, and Gatsby will _pull_ your updated title into files that reference it.
216216

217217
The place for these common bits of data is the `siteMetadata` object in the `gatsby-config.js` file. Add your site title to the `gatsby-config.js` file:
218218

@@ -293,8 +293,9 @@ Page queries live outside of the component definition -- by convention at the en
293293
### Use a StaticQuery
294294
295295
[StaticQuery](/docs/static-query/) is a new API introduced in Gatsby v2 that allows non-page components (like our `layout.js` component), to retrieve data via GraphQL queries.
296-
Let's use its newly introduced hook version — [`useStaticQuery`](/docs/use-static-query/)
297-
Go ahead and make some changes to your `src/components/layout.js` file to use the `useStaticQuery` hook and a `{data.site.siteMetadata.title}` reference that uses this data. When you are done your file looks like this:
296+
Let's use its newly introduced hook version — [`useStaticQuery`](/docs/use-static-query/).
297+
298+
Go ahead and make some changes to your `src/components/layout.js` file to use the `useStaticQuery` hook and a `{data.site.siteMetadata.title}` reference that uses this data. When you are done, your file will look like this:
298299

299300
```jsx:title=src/components/layout.js
300301
import React from "react"

0 commit comments

Comments
 (0)