Skip to content

Commit a4e0019

Browse files
gillkylesidharthachatterjee
authored andcommitted
docs: fix recipes structure (#16817)
1 parent 2b8fd50 commit a4e0019

File tree

1 file changed

+41
-39
lines changed

1 file changed

+41
-39
lines changed

docs/docs/recipes.md

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -683,43 +683,10 @@ query MyPokemonQuery {
683683

684684
## 6. Querying data
685685

686-
### Using a Page Query
686+
### Querying data with a Page Query
687687

688688
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.
689689

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`
715-
716-
#### Additional resources
717-
718-
- [Hosting on Netlify](/docs/hosting-on-netlify)
719-
- [gatsby-plugin-netlify](/packages/gatsby-plugin-netlify)
720-
721-
## Querying data
722-
723690
#### Directions
724691

725692
1. Import `graphql` from `gatsby`.
@@ -766,7 +733,7 @@ export default IndexPage
766733
- [More on querying data in pages with GraphQL](/docs/page-query/)
767734
- [MDN on Tagged Template Literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) like the ones used in GraphQL
768735
769-
### The StaticQuery Component
736+
### Querying data with the StaticQuery Component
770737
771738
`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.
772739
@@ -1526,16 +1493,20 @@ export const pageQuery = graphql`
15261493
15271494
## 8. Transforming data
15281495
1529-
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).
15301497
1531-
### Prerequisites
1498+
### Transforming Markdown into HTML
1499+
1500+
The `gatsby-transformer-remark` plugin can transform Markdown files to HTML.
1501+
1502+
#### Prerequisites
15321503
15331504
- A Gatsby site with `gatsby-config.js` and an `index.js` page
15341505
- A Markdown file saved in your Gatsby site `src` directory
15351506
- A source plugin installed, such as `gatsby-source-filesystem`
15361507
- The `gatsby-transformer-remark` plugin installed
15371508
1538-
### Directions
1509+
#### Directions
15391510
15401511
1. Add the transformer plugin in your `gatsby-config.js`:
15411512
@@ -1570,7 +1541,7 @@ export const query = graphql`
15701541
15711542
3. Restart the development server and open GraphiQL at `http://localhost:8000/___graphql`. Explore the fields available on the `MarkdownRemark` node.
15721543
1573-
### Additional resources
1544+
#### Additional resources
15741545
15751546
- [Tutorial on transforming Markdown to HTML](/tutorial/part-six/#transformer-plugins) using `gatsby-transformer-remark`
15761547
- Browse available transformer plugins in the [Gatsby plugin library](/plugins/?=transformer)
@@ -1624,3 +1595,34 @@ gatsby build && gatsby serve
16241595
- Learn about [performance optimization](/docs/performance/)
16251596
- Read about [other deployment related topics](/docs/preparing-for-deployment/)
16261597
- Check out the [deployment docs](/docs/deploying-and-hosting/) for specific hosting platforms and how to deploy to them
1598+
1599+
### Deploying to Netlify
1600+
1601+
Use [`netlify-cli`](https://www.netlify.com/docs/cli/) to deploy your Gatsby application without leaving the command line interface.
1602+
1603+
#### Prerequisites
1604+
1605+
- A [Gatsby site](/docs/quick-start) with a single component `index.js`
1606+
- The [netlify-cli](https://www.npmjs.com/package/netlify-cli) package installed
1607+
- The [Gatsby CLI](/docs/gatsby-cli) installed
1608+
1609+
#### Directions
1610+
1611+
1. Build your gatsby application using `gatsby build`
1612+
1613+
2. Login into netlify using `netlify login`
1614+
1615+
3. Run the command `netlify build`. Select the "Create & configure a new site" option.
1616+
1617+
4. Choose a custom website name if you want or press enter to receive a random one.
1618+
1619+
5. Choose your [Team](/docs/teams/).
1620+
1621+
6. Change the deploy path to `public/`
1622+
1623+
7. Make sure that everything looks fine before deploying to production using `netlify deploy --prod`
1624+
1625+
#### Additional resources
1626+
1627+
- [Hosting on Netlify](/docs/hosting-on-netlify)
1628+
- [gatsby-plugin-netlify](/packages/gatsby-plugin-netlify)

0 commit comments

Comments
 (0)