|
2 | 2 | title: Recipes |
3 | 3 | --- |
4 | 4 |
|
5 | | -This is a stub. Help our community expand it. |
| 5 | +<!-- Basic template: |
| 6 | +Task to accomplish. |
| 7 | +1-2 sentences about it. |
| 8 | +Relevant links out (tutorial, doc pages, plugin readmes, etc). |
6 | 9 |
|
7 | | -Please use the [Gatsby Style Guide](/docs/gatsby-style-guide/) to ensure your |
8 | | -pull request gets accepted. |
| 10 | +Links: |
| 11 | +* tutorial link |
| 12 | +* docs link |
| 13 | +* additional, if needed |
| 14 | +
|
| 15 | +And yeah — those three things are exactly what we're thinking. A first step would be to just go through the tutorial and pull out all the basic things we teach there in a condensed form e.g. creating a site, creating a page, linking between pages, etc. --> |
| 16 | + |
| 17 | +Craving a happy medium between doing the [full tutorial](/tutorial/) and crawling the [full docs]((/tutorial/))? Here's a quick guiding reference for how to build things, Gatsby style. |
| 18 | + |
| 19 | +## Table of Contents |
| 20 | +- [Using a starter](#using-a-starter) |
| 21 | +- [Creating pages](#creating-pages) |
| 22 | +- [Linking between pages](#linking-between-pages) |
| 23 | +- [Styling](#styling) |
| 24 | +- [Creating layouts](#creating-layouts) |
| 25 | +- [Deploying](#deploying) |
| 26 | +- [Querying data](#querying-data) |
| 27 | +- [Sourcing data](#sourcing-data) |
| 28 | +- [Transforming data](#transforming-data) |
| 29 | + |
| 30 | +## Using a starter |
| 31 | + |
| 32 | +Starters are boilerplate Gatsby sites maintained officially, or by the community. |
| 33 | + |
| 34 | +* Learn how to use the Gatsby CLI tool to use starters in [tutorial part one](/tutorial/part-one/#using-gatsby-starters) |
| 35 | +* See a list of [official and community starters](/docs/gatsby-starters/) |
| 36 | +* Check out Gatsby's [official default starter](https://github.com/gatsbyjs/gatsby-starter-default) |
| 37 | + |
| 38 | +## Creating pages |
| 39 | + |
| 40 | +You can create pages in Gatsby explicitly by definining React components in `src/pages/`, or programmatically by using the `createPages` API. |
| 41 | + |
| 42 | +* Walk through creating a page by defining a React component in `src/pages` in [tutorial part one](/tutorial/part-one/#familiarizing-with-gatsby-pages) |
| 43 | +* Walk through programmatically creating pages in [tutorial part seven](/tutorial/part-seven/) |
| 44 | +* Check out the docs overview on [creating and modifying pages](/docs/creating-and-modifying-pages/) |
| 45 | + |
| 46 | +## Linking between pages |
| 47 | + |
| 48 | +Routing in Gatsby relies on the `<Link />` component, a wrapper around [@reach/router's Link component](https://reach.tech/router/api/Link). |
| 49 | + |
| 50 | +* Walk through using Gatsby's `<Link />` component in [tutorial part one](/tutorial/part-one/#linking-between-pages) |
| 51 | +* Learn more about how `<Link />` works [in the docs](/docs/gatsby-link/) |
| 52 | + |
| 53 | +## Styling |
| 54 | +There are so many ways to add styles to your website; Gatsby supports almost every possible option, through official and community plugins. |
| 55 | + |
| 56 | +* Walk through adding global styles to an example site in [tutorial part two](/tutorial/part-two/#creating-global-styles) |
| 57 | + * More on global styles [with standard CSS files](/docs/creating-global-styles/#how-to-add-global-styles-in-gatsby-with-standard-css-files) |
| 58 | + * More on global styles with [CSS-in-JS](/docs/creating-global-styles/#how-to-add-global-styles-in-gatsby-using-css-in-js) |
| 59 | + * More on global styles [with CSS files and no layout component](/docs/creating-global-styles/#add-global-styles-with-css-files-and-no-layout-component) |
| 60 | +* Use the CSS-in-JS library [Glamor](/docs/glamor/) |
| 61 | +* Use the CSS-in-JS library [Styled Components](/docs/styled-components/) |
| 62 | +* Use [CSS Modules](/tutorial/part-two/#css-modules) |
| 63 | + |
| 64 | +## Creating layouts |
| 65 | + |
| 66 | +To wrap pages with layouts, use normal React components. |
| 67 | + |
| 68 | +* Walk through creating a layout component in [tutorial part three](/tutorial/part-three/#your-first-layout-component) |
| 69 | +* Gatsby v1 approached layouts differently. If the context is helpful, learn about the [differences in v2](/blog/2018-06-08-life-after-layouts/) |
| 70 | + |
| 71 | +## Deploying |
| 72 | + |
| 73 | +Showtime. |
| 74 | + |
| 75 | +* Walk through building and deploying an example site in [tutorial part one](/tutorial/part-one/#deploying-a-gatsby-site) |
| 76 | +* Learn how to make sure your site is configured properly to be [searchable, sharable, and properly navigable](/docs/preparing-for-site-launch/) |
| 77 | +* Learn about [performance optimization](/docs/performance/) |
| 78 | +* Read about [other deployment related topics](/docs/deploying-and-hosting/) |
| 79 | + |
| 80 | +## Querying data |
| 81 | + |
| 82 | +In Gatsby, you access data through a query language called [GraphQL](https://graphql.org/). |
| 83 | + |
| 84 | +* Walk through an example of how Gatsby's data layer [pulls data into components using GraphQL](/tutorial/part-four/#how-gatsbys-data-layer-uses-graphql-to-pull-data-into-components) |
| 85 | +* Walk through [using Gatsby's `graphql` tag for page queries](/tutorial/part-five/#build-a-page-with-a-graphql-query) |
| 86 | +* Read through a conceptual guide on [querying data with GraphQL in Gatsby](/docs/querying-with-graphql/) |
| 87 | +* Learn more about the `graphql` tag -- [querying data in a Gatsby page](/docs/page-query/) |
| 88 | +* Learn more about `<StaticQuery />` -- [querying data in (non-page) components](/docs/static-query/) |
| 89 | + |
| 90 | +## Sourcing data |
| 91 | + |
| 92 | +Data sourcing in Gatsby is plugin-driven; Source plugins fetch data from their source (e.g. the `gatsby-source-filesystem` plugin fetches data from the file system, the `gatsby-source-wordpress` plugin fetches data from the WordPress API, etc). |
| 93 | + |
| 94 | +* Walk through an example using the `gatsby-source-filesystem` plugin in [tutorial part five](/tutorial/part-five/#source-plugins) |
| 95 | +* Search available source plugins in the [Gatsby library](/plugins/?=source) |
| 96 | +* Understand source plugins by building one in the [source plugin tutorial](/docs/source-plugin-tutorial/) |
| 97 | + |
| 98 | +## Transforming data |
| 99 | + |
| 100 | +Transforming data in Gatsby is also plugin-driven; Transformer plugins take data fetched using source plugins, and process it into something more usable (e.g. JSON into JavaScript objects, markdown to HTML, and more). |
| 101 | + |
| 102 | +* Walk through an example using the `gatsby-transformer-remark` plugin to transform markdown files [tutorial part six](/tutorial/part-six/#transformer-plugins) |
| 103 | +* Search available transformer plugins in the [Gatsby library](/plugins/?=transformer) |
0 commit comments