You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/recipes.md
+41-39Lines changed: 41 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -683,43 +683,10 @@ query MyPokemonQuery {
683
683
684
684
## 6. Querying data
685
685
686
-
### Using a Page Query
686
+
### Querying data with a Page Query
687
687
688
688
You can use the `graphql` tag to query data in the pages of your Gatsby site. This gives you access to anything included in Gatsby's data layer, such as site metadata, source plugins, images, and more.
689
689
690
-
### Deploying to Netlify
691
-
692
-
Use [`netlify-cli`](https://www.netlify.com/docs/cli/) to deploy your Gatsby application without leaving the command line interface.
693
-
694
-
#### Prerequisites
695
-
696
-
- A [Gatsby site](/docs/quick-start) with a single component `index.js`
697
-
- The [netlify-cli](https://www.npmjs.com/package/netlify-cli) package installed
698
-
- The [Gatsby CLI](/docs/gatsby-cli) installed
699
-
700
-
#### Directions
701
-
702
-
1. Build your gatsby application using `gatsby build`
703
-
704
-
2. Login into netlify using `netlify login`
705
-
706
-
3. Run the command `netlify build`. Select the "Create & configure a new site" option.
707
-
708
-
4. Choose a custom website name if you want or press enter to receive a random one.
709
-
710
-
5. Choose your [Team](/docs/teams/).
711
-
712
-
6. Change the deploy path to `public/`
713
-
714
-
7. Make sure that everything looks fine before deploying to production using `netlify deploy --prod`
- [More on querying data in pages with GraphQL](/docs/page-query/)
767
734
- [MDN on Tagged Template Literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) like the ones used in GraphQL
768
735
769
-
### The StaticQuery Component
736
+
### Querying data with the StaticQuery Component
770
737
771
738
`StaticQuery` is a component for retrieving data from Gatsby's data layer in [non-page components](/docs/static-query/), such as a header, navigation, or any other child component.
Transforming data in Gatsby is plugin-driven. Transformer plugins take data fetched using source plugins, and process it into something more usable (e.g. JSON into JavaScript objects, and more). `gatsby-transformer-plugin` can transform Markdown files to HTML.
1496
+
Transforming data in Gatsby is plugin-driven. Transformer plugins take data fetched using source plugins, and process it into something more usable (e.g. JSON into JavaScript objects, and more).
1530
1497
1531
-
### Prerequisites
1498
+
### Transforming Markdown into HTML
1499
+
1500
+
The `gatsby-transformer-remark` plugin can transform Markdown files to HTML.
1501
+
1502
+
#### Prerequisites
1532
1503
1533
1504
- A Gatsby site with `gatsby-config.js` and an `index.js` page
1534
1505
- A Markdown file saved in your Gatsby site `src` directory
1535
1506
- A source plugin installed, such as `gatsby-source-filesystem`
1536
1507
- The `gatsby-transformer-remark` plugin installed
1537
1508
1538
-
### Directions
1509
+
#### Directions
1539
1510
1540
1511
1. Add the transformer plugin in your `gatsby-config.js`:
0 commit comments