Skip to content

Commit

Permalink
Rename Theme tutorials to Plugin and Theme Tutorials and update redir… (
Browse files Browse the repository at this point in the history
#21908)

* Rename Theme tutorials to Plugin and Theme Tutorials and update redirect links

* replace .md with / on links so the to path will include links

* fix indentation

* Update PR by removing /doc when not needed

* Update docs/tutorial/theme-tutorials.md

Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
Co-authored-by: LB <laurie@gatsbyjs.com>
  • Loading branch information
3 people authored Mar 9, 2020
1 parent 33de224 commit 14ac8fb
Show file tree
Hide file tree
Showing 17 changed files with 24 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docs/blog/100days/start-blog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ _Bonus:_ use your new blog to track your #100DaysOfGatsby progress! Research sho

To create your blog, start with our [beginner-focused Gatsby tutorials](/tutorial/) and complete lessons 0-8. Depending on your current skill level, erecting a Gatsby blog make take you an afternoon or a full week (or more) to complete.

If you are already familiar with Gatsby's APIs and conventions, and want a more advanced challenge, you can [create a Gatsby theme for your blog](/tutorial/theme-tutorials/).
If you are already familiar with Gatsby's APIs and conventions, and want a more advanced challenge, you can [create a Gatsby theme for your blog](/tutorial/plugin-and-theme-tutorials/).

### What to Do If You Need Help

Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/docs-contributions.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ Sometimes it makes sense to move or rename a file as part of docs restructuring

```yaml:title=www/redirects.yaml
- fromPath: /docs/source-plugin-tutorial/
toPath: /docs/pixabay-source-plugin-tutorial/
toPath: /tutorial/pixabay-source-plugin-tutorial/
```

## Claim your swag
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/gatsby-vendor-partnership.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Current partners have reported development timelines of 2-3 days when the conten

If you have a GraphQL-based API, you **may not need to build an integration at all** -- Gatsby supports integration with GraphQL APIs via so-called ["schema stitching"](/blog/2018-09-25-announcing-graphql-stitching-support/).

If you have questions while building your Gatsby integrations, try reading other supporting documentation such as the [general plugin authoring guide](/docs/creating-plugins/) and [source plugin tutorial](/docs/pixabay-source-plugin-tutorial/).
If you have questions while building your Gatsby integrations, try reading other supporting documentation such as the [general plugin authoring guide](/docs/creating-plugins/) and [source plugin tutorial](/tutorial/pixabay-source-plugin-tutorial/).

If you still have questions, please [raise an issue on GitHub](https://github.com/gatsbyjs/gatsby/issues), ask a question in [Discord chat](https://gatsby.dev/discord), or reach out to our team at [developer-relations@gatsbyjs.com](mailto:developer-relations@gatsbyjs.com).

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/naming-a-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ There are five standard plugin naming conventions for Gatsby:
- Docs: [creating a transformer plugin](/docs/creating-a-transformer-plugin/)
- **`gatsby-[plugin-name]-*`** — if a plugin is a plugin for another plugin 😅, it should be prefixed with the name of the plugin it extends (e.g. if it adds emoji to the output of `gatsby-transformer-remark`, call it `gatsby-remark-add-emoji`). Use this naming convention whenever your plugin will be included as a plugin in the `options` object of another plugin.
- Example: [`gatsby-remark-images`](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-remark-images)
- Docs: [creating a remark plugin](/docs/remark-plugin-tutorial/)
- Docs: [creating a remark plugin](/tutorial/remark-plugin-tutorial/)
- **`gatsby-theme-*`** — this naming convention is used for [Gatsby themes](/docs/themes/), which are a type of plugin. This naming convention is used for plugins that own a section, a page, or part of a page on a site or expose files and components for [shadowing](/docs/themes/shadowing/).
- Example: [`gatsby-theme-blog`](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-theme-blog)
- Docs: [creating a theme](/tutorial/building-a-theme/)
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/recipes/sourcing-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ query MyPokemonQuery {

- Walk through an example using the `gatsby-source-filesystem` plugin in [tutorial part five](/tutorial/part-five/#source-plugins)
- Search available source plugins in the [Gatsby library](/plugins/?=source)
- Understand source plugins by building one in the [Pixabay source plugin tutorial](/docs/pixabay-source-plugin-tutorial/)
- Understand source plugins by building one in the [Pixabay source plugin tutorial](/tutorial/pixabay-source-plugin-tutorial/)
- The createNode function [documentation](/docs/actions/#createNode)

## Sourcing Markdown data for blog posts and pages with GraphQL
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/schema-gql-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Now we can create a GraphQL Field declaration whose type is `AuthorYaml` (which

#### Foreign Key reference (`___NODE`)

If not a mapping field, it might instead end in `___NODE`, signifying that its value is an ID that is a foreign key reference to another node in redux. Check out the [Source Plugin Tutorial](/docs/pixabay-source-plugin-tutorial/) for how this works from a user point of view. Behind the scenes, the field inference is handled by [inferFromFieldName](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/schema/infer-graphql-type.js#L204).
If not a mapping field, it might instead end in `___NODE`, signifying that its value is an ID that is a foreign key reference to another node in redux. Check out the [Source Plugin Tutorial](/tutorial/pixabay-source-plugin-tutorial/) for how this works from a user point of view. Behind the scenes, the field inference is handled by [inferFromFieldName](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/schema/infer-graphql-type.js#L204).

This is actually quite similar to the mapping case above. We remove the `___NODE` part of the field name. E.g. `author___NODE` would become `author`. Then, we find our `linkedNode`. I.e given the example value for `author` (which would be an ID), we find its actual node in redux. Then, we find its type in processed types by its `internal.type`. Note, that also like in mapping fields, we can define the `linkedField` too. This can be specified via `nodeFieldname___NODE___linkedFieldName`. E.g. for `author___NODE___name`, the linkedField would be `name` instead of `id`.

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/sourcing-from-private-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ There are 3 approaches that you can use to source data from your private API:

1. If your private API is a GraphQL API, you can use [`gatsby-source-graphql`](/packages/gatsby-source-graphql/).
2. If your private API is not a GraphQL API and you are new to GraphQL, treat the data as unstructured data and fetch it during build time, as described by the guide "[Using Gatsby without GraphQL](/docs/using-gatsby-without-graphql/)". However, as highlighted in the guide, this approach comes with some tradeoffs.
3. Create a source plugin, as described in the tutorial "[Source plugin tutorial](/docs/pixabay-source-plugin-tutorial/)".
3. Create a source plugin, as described in the tutorial "[Source plugin tutorial](/tutorial/pixabay-source-plugin-tutorial/)".

## Other considerations

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ This means that the configuration and functionality isn’t directly written int

## Other resources

- [Gatsby theme tutorials](/tutorial/theme-tutorials/)
- [Gatsby theme tutorials](/tutorial/plugin-and-theme-tutorials/)
- [Gatsby blog posts on themes](/blog/tags/themes)
- [Plugins, Themes, and Starters](/docs/plugins-themes-and-starters/)
2 changes: 1 addition & 1 deletion docs/tutorial/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Gatsby themes abstract all of your default configuration (shared functionality,

This means that the configuration and functionality aren’t directly written into your project, but rather versioned, centrally managed, and installed as a dependency. You can seamlessly update a theme, compose themes together, and even swap out one compatible theme for another.

Learn more about using and building themes with the [Gatsby theme tutorials](/tutorial/theme-tutorials/).
Learn more about using and building themes with the [Gatsby theme tutorials](/tutorial/plugin-and-theme-tutorials/).

## Additional tutorials

Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 4 additions & 2 deletions docs/tutorial/theme-tutorials.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
title: Theme Tutorials
title: Plugin & Theme Tutorials
---

Gatsby themes are a new way to encapsulate, re-use, and compose Gatsby functionality.
Gatsby plugins are Node.js packages that implement Gatsby APIs and are commonly installed through a registry like npm. Plugins are a way to encapsulate, re-use, and compose Gatsby functionality. A good example of this concept are Gatsby themes which is a type of plugin that includes a `gatsby-config.js` file and adds pre-configured functionality, data sourcing, and/or UI code to Gatsby sites.

> You can refer to the [conceptual guide on plugins,theme,and starters](/docs/plugins-themes-and-starters/) for more information.
In this section, you'll find tutorials for:

Expand Down
2 changes: 1 addition & 1 deletion examples/using-local-plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This example demonstrates usage of a local plugin -- in this case a source plugin.

You might also be interested in the docs section on [local plugins](/docs/creating-a-local-plugin/), or the [source plugin tutorial](/docs/pixabay-source-plugin-tutorial/).
You might also be interested in the docs section on [local plugins](/docs/creating-a-local-plugin/), or the [source plugin tutorial](/tutorial/pixabay-source-plugin-tutorial/).

## Using Gatsby's GraphQL integration layer

Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-cli/src/create-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ Creating a plugin:
- Creating a Source Plugin (https://www.gatsbyjs.org/docs/creating-a-source-plugin/)
- Creating a Transformer Plugin (https://www.gatsbyjs.org/docs/creating-a-transformer-plugin/)
- Submit to Plugin Library (https://www.gatsbyjs.org/contributing/submit-to-plugin-library/)
- Pixabay Source Plugin Tutorial (https://www.gatsbyjs.org/docs/pixabay-source-plugin-tutorial/)
- Pixabay Source Plugin Tutorial (https://www.gatsbyjs.org/tutorial/pixabay-source-plugin-tutorial/)
- Maintaining a Plugin (https://www.gatsbyjs.org/docs/maintaining-a-plugin/)
- Join Discord #plugin-authoring channel to ask questions! (https://gatsby.dev/discord/)
`)
Expand Down
6 changes: 5 additions & 1 deletion www/redirects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,12 @@
toPath: /docs/creating-a-transformer-plugin/
- fromPath: /docs/plugin-authoring/
toPath: /docs/how-plugins-work/
- fromPath: /tutorial/theme-tutorials
toPath: /tutorial/plugin-and-theme-tutorials
- fromPath: docs/remark-plugin-tutorial.md
toPath: /tutorial/remark-plugin-tutorial/
- fromPath: /docs/source-plugin-tutorial/
toPath: /docs/pixabay-source-plugin-tutorial/
toPath: /tutorial/pixabay-source-plugin-tutorial/
- fromPath: /docs/how-plugins-work/
toPath: /docs/plugins/
- fromPath: /blog/2018-2-16-how-to-build-a-website-with-react/
Expand Down
4 changes: 2 additions & 2 deletions www/src/data/sidebars/doc-links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@
- title: Submit to Plugin Library
link: /contributing/submit-to-plugin-library/
- title: Pixabay Image Source Plugin Tutorial
link: /docs/pixabay-source-plugin-tutorial/
link: /tutorial/pixabay-source-plugin-tutorial/
- title: Remark Plugin Tutorial
link: /docs/remark-plugin-tutorial/
link: /tutorial/remark-plugin-tutorial/
- title: Maintaining a Plugin
link: /docs/maintaining-a-plugin/
- title: Themes
Expand Down
4 changes: 2 additions & 2 deletions www/src/data/sidebars/tutorial-links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@
link: /tutorial/part-eight/#add-page-metadata
- title: Keep making it better
link: /tutorial/part-eight/#keep-making-it-better
- title: Theme Tutorials
link: /tutorial/theme-tutorials/
- title: Plugin & Theme Tutorials
link: /tutorial/plugin-and-theme-tutorials/
items:
- title: Using a Theme
link: /tutorial/using-a-theme/
Expand Down

0 comments on commit 14ac8fb

Please sign in to comment.