Skip to content

Commit 21567d4

Browse files
feat(docs): add examples to site (#31540)
* add examples to site * add tree/master/ * add more tree/master/ * Apply suggestions from code review Co-authored-by: Kyle Mathews <[email protected]> Co-authored-by: Kyle Mathews <[email protected]>
1 parent 968db84 commit 21567d4

28 files changed

+89
-5
lines changed

docs/docs/adding-search-with-js-search.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Adding Search with JS Search
3+
examples:
4+
- label: Using js-search
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-js-search"
36
---
47

58
## Prerequisites

docs/docs/building-an-ecommerce-site-with-shopify.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Building an E-commerce site with Shopify
3+
examples:
4+
- label: Gatsby Shopify Starter
5+
href: "https://github.com/gatsbyjs/gatsby-starter-shopify"
36
---
47

58
In this tutorial, you will setup a new Gatsby website that fetches product data from [Shopify](https://www.shopify.com). The site displays a list of all products on a product listing page, and a page for every product in the store.
@@ -190,8 +193,3 @@ exports.createPages = async ({ graphql, actions }) => {
190193
})
191194
}
192195
```
193-
194-
## Additional Resources
195-
196-
- [Gatsby Shopify Starter](/starters/AlexanderProd/gatsby-shopify-starter/)
197-
- [Gatsby Shopify Hello World](/starters/ohduran/gatsby-starter-hello-world-shopify/)

docs/docs/conceptual/making-your-site-accessible.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Making Your Site Accessible
3+
examples:
4+
- label: Using react-skip-nav
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-reach-skip-nav"
36
---
47

58
The Gatsby team is passionate about helping you create websites that work for everyone, with helpful defaults that bake in web accessibility as well as performance optimizations. By making your website accessible to people with disabilities, you can make more inclusive sites that reach and remove barriers for more people on the Internet.

docs/docs/creating-a-local-plugin.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
---
22
title: Creating a Local Plugin
3+
examples:
4+
- label: Using Local Plugins
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-local-plugins"
6+
- label: Using Multiple Local Plugins
7+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-multiple-local-plugins"
38
---
49

510
If a plugin is only relevant to your specific use-case, or if you’re developing a plugin and want a simpler workflow, a locally defined plugin is a convenient way to create and manage your plugin code.

docs/docs/how-to/adding-common-features/adding-an-rss-feed.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Adding an RSS Feed
3+
examples:
4+
- label: Using RSS Feed
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/feed"
36
---
47

58
## What is an RSS feed?

docs/docs/how-to/adding-common-features/adding-page-transitions-with-plugin-transition-link.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Adding Page Transitions with gatsby-plugin-transition-link
3+
examples:
4+
- label: Using page-transitions
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-page-transitions"
36
---
47

58
This guide will cover how to use `gatsby-plugin-transition-link` to animate transitions between pages on your Gatsby site.

docs/docs/how-to/adding-common-features/creating-a-sitemap.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Creating a Sitemap
3+
examples:
4+
- label: Using gatsby-plugin-sitemap
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/sitemap"
36
---
47

58
## What is a sitemap?

docs/docs/how-to/adding-common-features/localization-i18n.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Localization and Internationalization with Gatsby (i18n)
3+
examples:
4+
- label: Using-i18n
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-i18n"
36
---
47

58
Serving users content in a way that is adapted to their language & culture is part of a great user experience. When you make an effort to adapt web content to a user's location, that practice is called internationalization (i18n).

docs/docs/how-to/adding-common-features/processing-payments-with-stripe.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Processing Payments with Stripe
3+
examples:
4+
- label: Using Stripe
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/ecommerce-tutorial-with-stripe"
36
---
47

58
## Why Stripe and Gatsby?

docs/docs/how-to/custom-configuration/typescript.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: TypeScript and Gatsby
3+
examples:
4+
- label: Using Typescript
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-typescript"
36
---
47

58
## Introductory paragraph

docs/docs/how-to/images-and-media/using-gatsby-plugin-image.md

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ title: Using the Gatsby Image plugin
33
examples:
44
- label: Using Gatsby Image
55
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-gatsby-image"
6+
- label: GatsbyGram
7+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/gatsbygram"
68
---
79

810
_If you're looking for a guide on using the deprecated `gatsby-image` package, it can be found in the [How to use Gatsby Image](/docs/how-to/images-and-media/using-gatsby-image) doc._

docs/docs/how-to/images-and-media/working-with-video.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Working with Video
3+
examples:
4+
- label: Using video
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-video"
36
---
47

58
## Sourcing video from a host

docs/docs/how-to/plugins-and-themes/configuring-usage-with-plugin-options.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Configuring Plugin Usage with Plugin Options
3+
examples:
4+
- label: Using plugin options
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-plugin-options"
36
---
47

58
Plugins loaded into a Gatsby site can have options passed in to customize how a plugin operates.

docs/docs/how-to/previews-deploys-hosting/path-prefix.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Adding a Path Prefix
3+
examples:
4+
- label: Using path-prefix
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-path-prefix"
36
---
47

58
Many applications are hosted at something other than the root (`/`) of their domain.

docs/docs/how-to/querying-data/using-gatsby-without-graphql.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Gatsby without GraphQL
3+
examples:
4+
- label: Using Gatsby without GraphQL
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-gatsby-without-graphql"
36
---
47

58
Most examples in the Gatsby docs and on the web at large focus on leveraging source plugins to manage your data in Gatsby sites. However, source plugins (or even Gatsby nodes) aren't strictly necessary to pull data into a Gatsby site! It's also possible to use an “unstructured data” approach in Gatsby sites, no GraphQL required.

docs/docs/how-to/routing/adding-markdown-pages.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Adding Markdown Pages
3+
examples:
4+
- label: Using gatsby-transformer-remark
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-remark"
36
---
47

58
Gatsby can use Markdown files to create pages in your site.

docs/docs/how-to/routing/client-only-routes-and-user-authentication.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
---
22
title: Client-only Routes & User Authentication
3+
examples:
4+
- label: Client-only Paths
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/client-only-paths"
6+
- label: Simple Authentication
7+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/simple-auth"
38
---
49

510
Often you want to create a site with client-only portions, which allows you to gate them by authentication or load different content based on URL parameters.

docs/docs/how-to/routing/creating-routes.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Creating Routes
3+
examples:
4+
- label: Using Collection Routing
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/route-api"
36
---
47

58
There are multiple ways to create routes in Gatsby.

docs/docs/how-to/routing/mdx.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Add components to content using MDX
3+
examples:
4+
- label: Using MDX
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-MDX"
36
---
47

58
## Introduction

docs/docs/how-to/sourcing-data/sourcing-from-contentful.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Sourcing from Contentful
3+
examples:
4+
- label: Using Contentful
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-contentful"
36
---
47

58
## What is Contentful? Why choose it?

docs/docs/how-to/sourcing-data/sourcing-from-drupal.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Sourcing from Drupal
3+
examples:
4+
- label: Using Drupal
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-drupal"
36
---
47

58
## Why use Drupal + Gatsby together?

docs/docs/how-to/sourcing-data/sourcing-from-wordpress.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
---
22
title: Sourcing from WordPress
3+
examples:
4+
- label: Using WordPress
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-wordpress"
6+
- label: Using WordPress with ACF
7+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-wordpress-with-acf"
38
---
49

510
This guide will walk you through the process of using Gatsby with WordPress and [WPGraphQL](https://www.wpgraphql.com/).

docs/docs/how-to/styling/css-modules.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Component-Scoped Styles with CSS Modules
3+
examples:
4+
- label: Using CSS Modules
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-css-modules"
36
---
47

58
Component-scoped CSS allows you to write traditional, portable CSS with minimal side-effects: gone are the worries of selector name collisions or affecting other components' styles.

docs/docs/how-to/styling/emotion.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Emotion
3+
examples:
4+
- label: Using Emotion
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-emotion"
36
---
47

58
In this guide, you will learn how to set up a site with the CSS-in-JS library [Emotion](https://emotion.sh).

docs/docs/how-to/styling/sass.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Using Sass in Gatsby
3+
examples:
4+
- label: Using Sass
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-sass"
36
---
47

58
[Sass](https://sass-lang.com) is an extension of CSS, adding nested rules, variables, mixins, selector inheritance, and more. In Gatsby, Sass code can be translated to well-formatted, standard CSS using a plugin.

docs/docs/how-to/styling/styled-components.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Styled Components
3+
examples:
4+
- label: Using Styled Components
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-styled-components"
36
---
47

58
In this guide, you will learn how to set up a site with the CSS-in-JS library [Styled Components](https://styled-components.com/).

docs/docs/how-to/testing/end-to-end-testing.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: End-to-End Testing
3+
examples:
4+
- label: Using Cypress
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-cypress"
36
---
47

58
[Cypress](https://www.cypress.io/) is one of the options when it comes to end-to-end (E2E) testing. Cypress is an all-in-one testing framework focused on E2E testing, meaning that you don't have to install 10 different things to get your test suite set up. You can write your first passing test in minutes without any configuration with the help of Cypress' API, which is easy to read and understand. It runs tests as fast as your browser can render content, which also makes test-driven development possible. You'll also profit from the time travel feature or the extensive debugging capabilities with Chrome DevTools. You can also use it with Gatsby, and this guide will explain how.

docs/docs/how-to/testing/unit-testing.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Unit Testing
3+
examples:
4+
- label: Using Jest
5+
href: "https://github.com/gatsbyjs/gatsby/tree/master/examples/using-jest"
36
---
47

58
Unit testing is a great way to protect against errors in your code before you

0 commit comments

Comments
 (0)