Skip to content

Commit 31727e0

Browse files
committed
Merge branch 'master' into moonmeister/feat/sitemap-rewrite
* master: (183 commits) chore(gatsby-plugin-image): Remove version note (#30758) docs: retire 'How to Create Pages' stub and Recipes landing page (#30842) chore(docs): Fix typo (#30858) docs: fix invalid mailto links in 3.3 release notes (#30862) docs: release notes for 3.3 (#30837) fix(gatsby-source-wordpress): invalidate less queries during previews (#30770) fix(gatsby-starter-wordpress-blog): Fix altText (#30832) feat(contentful): warn users when using restricted content type names (#30715) Refactor: using-contentful to use gatsby-plugin-image exclusively (#30717) chore(gatsby-plugin-styled-components): Remove breaking changes section (#30806) fix(gatsby): webpack warnings are no longer in object format by default (#30801) fix(gatsby): Decode base path in runtime (#30682) fix(gatsby): "Cannot find module 'babel-preset-gatsby'" error (#30813) handle plugin parentDir resolution in resolvePlugin() (#30812) Port using-gatsby-image site to image plugin (#28489) fix(gatsby-source-contentful): De-dupe type names (#30834) feat(gatsby): Add aggregation resolvers (#30789) fix(gatsby-core-utils): fetch-remote-file download failure when missing content-length header (#30810) fix(renovate): add breaking minor updates to major updates list (#30676) chore(docs): Update migration guide for plugins that support both v2 & v3 (#30825) ...
2 parents 039fe4c + 9ff665e commit 31727e0

File tree

611 files changed

+20128
-9767
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

611 files changed

+20128
-9767
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ __diff_output__/
5151
# misc
5252
.serverless/
5353
.eslintcache
54+
scripts/.env
5455

5556
# lock files
5657
yarn.lock

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
Gatsby v3
88
</h1>
99

10-
<h3 align="center">
10+
<p align="center">
1111
⚛️ 📄 🚀
12-
</h3>
13-
<h3 align="center">
14-
Fast in every way that matters
15-
</h3>
12+
</p>
13+
<p align="center">
14+
<strong>
15+
Fast in every way that matters
16+
</strong>
17+
</p>
1618
<p align="center">
1719
Gatsby is a free and open source framework based on React that helps developers build blazing fast websites and apps
1820
</p>
@@ -40,7 +42,7 @@
4042
</a>
4143
</p>
4244

43-
<h3 align="center">
45+
<h2 align="center">
4446
<a href="https://www.gatsbyjs.com/docs/">Quickstart</a>
4547
<span> · </span>
4648
<a href="https://www.gatsbyjs.com/tutorial/">Tutorial</a>
@@ -56,7 +58,7 @@
5658
Support: <a href="https://twitter.com/AskGatsbyJS">Twitter</a>, <a href="https://github.com/gatsbyjs/gatsby/discussions">Discussions</a>
5759
<span> & </span>
5860
<a href="https://gatsby.dev/discord">Discord</a>
59-
</h3>
61+
</h2>
6062

6163
Gatsby is a modern web framework for blazing fast websites.
6264

@@ -138,6 +140,10 @@ We welcome suggestions for improving our docs. See the [“how to contribute”]
138140

139141
**Start Learning Gatsby: [Follow the Tutorial](https://www.gatsbyjs.com/tutorial/) · [Read the Docs](https://www.gatsbyjs.com/docs/)**
140142

143+
## 🚢 Release Notes
144+
145+
Wondering what we've shipped recently? Check out our [release notes](https://www.gatsbyjs.com/docs/reference/release-notes) for key highlights, performance improvements, new features, and notable bugfixes.
146+
141147
## 💼 Migration Guides
142148

143149
Already have a Gatsby site? These handy guides will help you add the improvements of Gatsby v3 to your site without starting from scratch!
@@ -161,7 +167,7 @@ This repository is a [monorepo](https://trunkbaseddevelopment.com/monorepos/) ma
161167

162168
### Contributing to Gatsby v2
163169

164-
We are currently only accepting bug fixes for Gatsby v2. No new features will be accepted.
170+
We are only accepting critical security patches for Gatsby v2.
165171

166172
## 📝 License
167173

benchmarks/create-pages/gatsby-node.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
const NUM_PAGES = parseInt(process.env.NUM_PAGES || 5000, 10)
22

3+
const blankTemplate = require.resolve(`./src/templates/blank.js`)
34
exports.createPages = ({ actions: { createPage } }) => {
45
for (let step = 0; step < NUM_PAGES; step++) {
56
createPage({
67
path: `/path/${step}/`,
7-
component: require.resolve(`./src/templates/blank.js`),
8+
component: blankTemplate,
89
context: {
910
id: step,
1011
},

docs/contributing/blog-contributions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
title: Blog Contributions
33
---
44

5-
If you'd like to contribute a post to the Gatsby blog, please review the process and guidelines outlined below and submit your idea for the post to our [Gatsby blog proposal form](https://airtable.com/shr3449954866i3iF)
5+
Blog posts are a great way to share your own experiences working with Gatsby at work or on a personal project.
6+
7+
If you'd like to contribute a post to the Gatsby blog, please review the process and guidelines outlined below and submit your post idea using the [Gatsby blog proposal form](https://airtable.com/shr3449954866i3iF).
68

79
## Blog proposal submission process
810

Lines changed: 59 additions & 0 deletions
Loading
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: How the Docs are Structured
3+
---
4+
5+
## Introduction
6+
7+
If you're looking to contribute to the Gatsby documentation, it helps to first understand how the docs are organized. This page outlines the overall structure of the Gatsby documentation. It also provides guidance on when you might choose one type of documentation over another.
8+
9+
## Documentation Types
10+
11+
The [Gatsby documentation site](/docs) includes four different types of materials. Each one is tailored to meet a specific user need.
12+
13+
- [**How-To Guides**](/docs/how-to/) are practical step-by-step guides to help readers achieve a specific goal. These are most useful when readers are trying to get something done.
14+
- [**Reference Guides**](/docs/reference/) are nitty-gritty technical descriptions of how Gatsby works. These are most useful when readers need detailed information about Gatsby's APIs.
15+
- [**Conceptual Guides**](/docs/conceptual/) are big-picture explanations of higher-level Gatsby concepts. These are most useful when readers want to deepen their understanding of a particular topic.
16+
- The [**Tutorial**](/docs/tutorial/) is a self-contained introduction that guides readers step-by-step through creating their first Gatsby site. This is most useful when readers are first getting started with Gatsby.
17+
18+
![Each of the four types of docs has a different intended audience. The Tutorial is for learning-oriented readers, who want practical steps to help when they're studying. How-To Guides are for problem-oriented readers, who want practical steps to help when they're working. Reference Guides are for information-oriented readers, who want theoretical knowledge to help when they're working. Conceptual Guides are for understanding-oriented readers, who want theoretical knowledge to help when they're studying.](./doc-type-quadrants.svg)
19+
20+
> This documentation structure is based on the [Diátaxis documentation system](https://diataxis.fr) created by Daniele Procida.
21+
22+
### Choosing what type of doc to write
23+
24+
Trying to decide which type of documentation is the best fit? Check out the following guides:
25+
26+
- [How to Write a How-To Guide](/contributing/docs-contributions/how-to-write-a-how-to-guide/)
27+
- [How to Write a Reference Guide](/contributing/docs-contributions/how-to-write-a-reference-guide/)
28+
- [How to Write a Conceptual Guide](/contributing/docs-contributions/how-to-write-a-conceptual-guide/)
29+
- [How to Write a Tutorial](/contributing/docs-contributions/how-to-write-a-tutorial)
30+
31+
The guides above provide more details about each type of documentation. They also include templates and tips for how to write them. Use these resources to make sure your docs contribution fits the overall documentation structure.
32+
33+
Sometimes, a single concept will require some combination of these documentation types. For example, the `gatsby-plugin-image` documentation includes the following pieces:
34+
35+
- [Gatsby Image plugin](/docs/reference/built-in-components/gatsby-plugin-image/): A Reference Guide to explain the plugin API and all its options.
36+
- [Using the Gatsby Image plugin](/docs/how-to/images-and-media/using-gatsby-plugin-image/): A How-To Guide to show practical examples of how to use the plugin.
37+
38+
### Other types of documentation
39+
40+
Aside from the four main documentation types, there are a few additional types of documentation found in the Gatsby repo. Check out the following guides for more information:
41+
42+
- [How to Write a Plugin README](/contributing/docs-contributions/how-to-write-a-plugin-readme)
43+
- [How to Write a Starter README](/contributing/docs-contributions/how-to-write-a-starter-readme)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: How to Write a Conceptual Guide
3+
---
4+
5+
## What is a Conceptual Guide?
6+
7+
A Conceptual Guide provides a big-picture explanation of higher-level Gatsby concepts. Conceptual Guides are most useful for readers who want to build a deeper understanding of a particular topic.
8+
9+
Rather than focusing on specific technical details, Conceptual Guides take a step back to look at the broader picture. For example, it might explain [image optimizations](/docs/conceptual/using-gatsby-image/) or compare [build time and runtime data fetching](/docs/conceptual/data-fetching/).
10+
11+
You can think of a Conceptual Guide as a discussion. It compares the benefits and risks of different approaches. It provides additional historical context to explain how things ended up the way they are.
12+
13+
> For more information on Conceptual Guides, check out the [Diátaxis documentation system](https://diataxis.fr/explanation/), which the Gatsby docs are based on.
14+
>
15+
> **Note:** In the Diátaxis system, these types of docs are called "Explanations" instead of "Conceptual Guides".
16+
17+
## A near-perfect example of a Conceptual Guide
18+
19+
Want to see what a good Conceptual Guide looks like? Check out the [Conceptual Guide: Plugins, Themes, & Starters](/docs/conceptual/plugins-themes-and-starters/).
20+
21+
## Conceptual Guide template
22+
23+
Because of the open-ended nature of a Conceptual Guide, it's difficult to create a template for how to structure one.
24+
25+
Instead, here's a list of questions to consider as you're writing:
26+
27+
- What is the central, underlying concept for this topic? Why is that something worth learning about?
28+
- What historical background or past decisions would be helpful for newcomers trying to understanding this concept?
29+
- Are there any other solutions or approaches? What are the pros and cons of each approach?
30+
- What other viewpoints should be considered?
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
title: How to Write a How-To Guide
3+
---
4+
5+
## What is a How-To Guide?
6+
7+
A How-To Guide is a practical step-by-step guide that helps readers achieve a specific goal. How-To Guides are most useful when readers want to get something done.
8+
9+
How-To Guides work well for outlining procedures that readers need to follow. You can think of a How-To Guide as a recipe used in cooking. It walks you through the steps to complete a task, from start to finish. It should only include as much context as is needed to help users achieve their goal.
10+
11+
A How-To Guide can include _some_ details to help users understand the steps they're following. For example, you should add a quick sentence before showing a code snippet, to explain what the code does (at a high level) and which pieces to pay special attention to. If you find yourself wanting to provide deeper explanations of how something works, consider creating a separate [Reference Guide](/contributing/docs-contributions/how-to-write-a-reference-guide) or [Conceptual Guide](/contributing/docs-contributions/how-to-write-a-conceptual-guide) and then linking to it in the How-To Guide.
12+
13+
> For more information on How-To Guides, check out the [Diátaxis documentation system](https://diataxis.fr/how-to-guides/), which the Gatsby docs are based on.
14+
15+
## How-To Guides audience
16+
17+
How-To Guides are for anyone looking to complete a common Gatsby task, however they may appeal to intermediate to advanced learners due to their brevity and focus on Gatsby-specific details without going through every setup step.
18+
19+
## How-To Guides tone and style
20+
21+
How-To Guides are shorter and more concise than the Tutorial but more hands-on than Reference Guides. They should be friendly but information-dense. This is accomplished by focusing on only what is relevant and actionable to the given task, anticipating any new or difficult concepts with links to additional materials to continue learning.
22+
23+
## A near-perfect example of a How-To Guide
24+
25+
Want to see what a good How-To Guide looks like? Check out the [How-To Guide: Add a Plugin to Your Site](/docs/how-to/plugins-and-themes/using-a-plugin-in-your-site).
26+
27+
## How-To Guide template
28+
29+
The title of your How-To Guide should specify what it helps readers do. You should be able to add the words "how to" to the beginning and have it make sense. For example, if your guide is about "how to create a new layout component", the title would be "Create a New Layout Component."
30+
31+
A How-To Guide should include the following sections:
32+
33+
- **Introduction:** Provide some quick background information to help readers understand 1) what this How-To Guide will help them achieve and 2) why that's useful.
34+
- **Prerequisites:** Any additional information or setup readers will have to do before they can make use of this How-To Guide.
35+
- **Directions:** List out the steps that readers to follow to complete the task. Use code blocks to show exactly what readers should type in their own projects.
36+
- **Additional Resources:** Links to other docs or content that might be useful next steps for readers. Also, any resources that helped you write the How-To Guide.
37+
38+
```markdown
39+
---
40+
title: Do Some Task
41+
---
42+
43+
## Introduction
44+
45+
The introductory paragraph should be a 2-3 sentence explanation of the
46+
main topic and answer the following questions:
47+
48+
What is the purpose of this guide? What will readers have achieved by
49+
following the steps in this guide?
50+
51+
Why is this process worth doing? How will it help readers improve their
52+
Gatsby site?
53+
54+
## Prerequisites
55+
56+
If applicable, list any prerequisites to reading and understanding your
57+
article.
58+
59+
Does the reader need to read another document first, install a particular
60+
plugin, or already know a certain skill? List those things here.
61+
62+
## Directions
63+
64+
This section should be a step-by-step list of instructions for how readers
65+
can achieve the goal.
66+
67+
1. Do the first thing.
68+
2. Do the next thing.
69+
70+
Use code blocks to show exactly what readers should type. The
71+
Gatsby Style Guide includes tips for best practices when using code
72+
blocks:
73+
https://www.gatsbyjs.com/contributing/gatsby-style-guide/#format-code-blocks-inline-code-and-images
74+
75+
If it's a particularly long list of directions, you can split the steps into
76+
sections. Use subheadings to label each chunk. For example:
77+
78+
### Step 1: Do the first thing.
79+
80+
1. The first step of the first thing.
81+
1. The second step of the first thing.
82+
83+
### Step 2: Do some other thing.
84+
85+
1. The first step of some other thing.
86+
1. The second step of some other thing.
87+
88+
## Additional Resources
89+
90+
Include other resources you think readers would benefit from or next steps
91+
they might want to take after reading your How-To Guide. You can also
92+
mention any resources that helped you write the article (blog posts, outside
93+
tutorials, etc.).
94+
95+
Best-case scenario, these should be high-quality, evergreen
96+
(not quickly outdated) resources.
97+
98+
- Link to a blog post
99+
- Link to a YouTube tutorial
100+
- Link to an example site
101+
- Link to source code for a live site
102+
- Links to relevant plugins
103+
- Links to starters
104+
```

docs/contributing/how-to-write-a-plugin-readme.md renamed to docs/contributing/docs-contributions/how-to-write-a-plugin-readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
22
title: How to Write a Plugin README
3-
issue: https://github.com/gatsbyjs/gatsby/issues/21599
43
---
54

5+
A plugin README is like a Reference Guide for a specific plugin. It should describe what the plugin does, how to install and configure it, and how to use it in your site.
6+
67
## Near-perfect example of a plugin README
78

89
[`gatsby-source-filesystem`](/plugins/gatsby-source-filesystem/)

0 commit comments

Comments
 (0)