Skip to content

Commit 395b0b5

Browse files
committed
merge master
2 parents f3c2754 + 51b9041 commit 395b0b5

File tree

185 files changed

+5490
-1267
lines changed

Some content is hidden

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

185 files changed

+5490
-1267
lines changed

CODEOWNERS

Lines changed: 0 additions & 18 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<a href="https://circleci.com/gh/gatsbyjs/gatsby">
2424
<img src="https://circleci.com/gh/gatsbyjs/gatsby.svg?style=shield" alt="Current CircleCI build status." />
2525
</a>
26-
<a href="https://www.npmjs.org/package/gatsby">
26+
<a href="https://www.npmjs.com/package/gatsby">
2727
<img src="https://img.shields.io/npm/v/gatsby.svg" alt="Current npm package version." />
2828
</a>
2929
<a href="https://npmcharts.com/compare/gatsby?minimal=true">

benchmarks/gabe-fs-mdx/gatsby-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = {
1313
{
1414
resolve: `gatsby-plugin-mdx`,
1515
options: {
16-
lessBabel: true,
16+
// lessBabel: true,
1717
},
1818
},
1919
],

docs/contributing/community.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ If you need an answer right away, check out the
6262
[Gatsby Discord](https://gatsby.dev/discord). Community & team members are happy to help you out or point you to
6363
useful resources.
6464

65+
### GitHub Discussions
66+
67+
Directly integrated into the repository, you can use [GitHub Discussions](https://github.com/gatsbyjs/gatsby/discussions) to ask for help or share ideas.
68+
6569
### Hashnode
6670

6771
Many members of the community also use Hashnode to ask questions and share their tips. Read through

docs/docs/add-seo-component.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Now define the query and pass it to `useStaticQuery`. You can also alias query i
6262

6363
```jsx:title=src/components/seo.js
6464
const SEO = ({ title, description, image, article }) => {
65-
const { location } = useLocation()
65+
const { pathname } = useLocation()
6666
const { site } = useStaticQuery(query)
6767

6868
return null

docs/docs/deploying-to-firebase.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ In this guide, you will learn how to deploy your Gatsby site to Firebase Hosting
5858
"headers": [
5959
{
6060
"key": "cache-control",
61-
"value": "cache-control: public, max-age=0, must-revalidate"
61+
"value": "public, max-age=0, must-revalidate"
6262
}
6363
]
6464
},
@@ -85,7 +85,7 @@ In this guide, you will learn how to deploy your Gatsby site to Firebase Hosting
8585
"headers": [
8686
{
8787
"key": "cache-control",
88-
"value": "cache-control: public, max-age=0, must-revalidate"
88+
"value": "public, max-age=0, must-revalidate"
8989
}
9090
]
9191
},
@@ -94,7 +94,7 @@ In this guide, you will learn how to deploy your Gatsby site to Firebase Hosting
9494
"headers": [
9595
{
9696
"key": "cache-control",
97-
"value": "cache-control: public, max-age=0, must-revalidate"
97+
"value": "public, max-age=0, must-revalidate"
9898
}
9999
]
100100
}

docs/docs/gatsby-cli.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ gatsby new
6666
(Use a different starter)
6767
```
6868
69+
_Note: you can try out the experimental interactive experience from the `create-gatsby` package with the `GATSBY_EXPERIMENTAL_GATSBY_NEW_FLOW=true` flag, which will prompt you with questions about the kind of site you're building, and install the plugins you'll need automatically._
70+
6971
See the [Gatsby starters docs](/docs/gatsby-starters/) for more details.
7072
7173
### `develop`
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
---
2+
date: "2020-11-12"
3+
version: "2.26.0"
4+
---
5+
6+
# [v2.26](https://github.com/gatsbyjs/gatsby/compare/[email protected]@2.26.0) (November 2020)
7+
8+
---
9+
10+
Welcome to `[email protected]` release (November 2020).
11+
Key highlights of this release:
12+
13+
- [New Image Plugin (beta)](#gatsby-plugin-image010-beta) - access static images without GraphQL, high Lighthouse scores again
14+
- [File System Route API](#file-system-route-api) - create routes from your data using filename conventions
15+
- [New Release Process](#new-release-process) - more stability and clarity around Gatsby releases
16+
- [gatsby-source-contentful v4.0](#gatsby-source-contentful400) - new RichText implementation, performance improvements
17+
18+
Other notable changes:
19+
20+
- [gatsby-plugin-mdx](#gatsby-plugin-mdx140) - performance improvements
21+
- [Enable compression in the dev server](#enable-compression-in-the-dev-server) - speeds up remote previews
22+
23+
Sneak peek to next releases:
24+
25+
- [Queries on Demand](#queries-on-demand) - improves `gatsby develop` bootup time
26+
- [Experimental: Lazy images in develop](#experimental-lazy-images-in-develop)
27+
- [Documentation Reorganization](#documentation-reorganization)
28+
29+
**Bleeding Edge:** Want to try new features as soon as possible? Install `gatsby@next` and let us know
30+
if you have any [issues](https://github.com/gatsbyjs/gatsby/issues).
31+
32+
### New Release Process
33+
34+
We are evaluating a new process that should bring more stability and clarity
35+
to Gatsby releases.
36+
37+
### File System Route API
38+
39+
This new API enables you to create routes from your GraphQL data using filename conventions,
40+
e.g. to create individual blog post pages for your blog. It also allows for creating client-only routes more easily.
41+
42+
Some examples:
43+
44+
- `src/pages/products/{Product.name}.js` will generate pages for all products with a path like `/products/burger`
45+
- `src/pages/products/{Product.fields__sku}.js` will generate pages for all products with a path like `/products/001923`
46+
- `src/pages/users/[id].js` will generate a route like `/users/:id`
47+
- `src/pages/image/[...].js` will generate a route like `/image/*`
48+
49+
See [full documentation](https://www.gatsbyjs.com/docs/file-system-route-api/),
50+
[examples](https://github.com/gatsbyjs/gatsby/tree/master/examples/route-api)
51+
and related PR [#27424](https://github.com/gatsbyjs/gatsby/pull/27424).
52+
53+
### Enable compression in the dev server
54+
55+
This lowers the amount of data transferred for one site especially in remote situations.
56+
Most of that drop was from the commons.js bundle.
57+
58+
See PR [#27948](https://github.com/gatsbyjs/gatsby/pull/27948) for details.
59+
60+
61+
62+
[New image plugin](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-image) to replace `gatsby-image`, which greatly improves performance (Lighthouse 💯 again) and adds easy static images (no GraphQL). Part of it is also a new, simpler API for `gatsby-transformer-sharp`.
63+
64+
### StaticImage
65+
66+
This component is a new, simpler way to use Gatsby's image processing for static images without needing to write GraphQL queries:
67+
68+
```js
69+
import React from "react"
70+
import { StaticImage } from "gatsby-plugin-image"
71+
72+
export const Dino = () => (
73+
<StaticImage width={100} height={100} src="trex.png" alt="T-Rex" />
74+
)
75+
```
76+
77+
### GatsbyImage
78+
79+
This is a complete rewrite of the Gatsby Image component, using native lazy loading whenever possible.
80+
In our tests it allows sites whose Lighthouse scores dropped in recent updates to get back to 100s across the board.
81+
82+
### Simpler GraphQL for non-static images
83+
84+
Instead of having to remember lots of different fragments for different image types,
85+
you can pass all your options as field arguments (and get inline help in GraphiQL):
86+
87+
```graphql
88+
query {
89+
file(relativePath: { eq: "plant.jpg" }) {
90+
childImageSharp {
91+
gatsbyImageData(maxWidth: 720, layout: FLUID, placeholder: TRACED_SVG)
92+
}
93+
}
94+
}
95+
```
96+
97+
You then use the data like this:
98+
99+
```jsx
100+
import { GatsbyImage, getImage } from "gatsby-plugin-image"
101+
102+
export function Plant({ data }) {
103+
const imageData = getImage(data.file)
104+
return <GatsbyImage image={imageData} alt="Plant" />
105+
}
106+
```
107+
108+
- [Details, Migration guide and discussion](https://github.com/gatsbyjs/gatsby/discussions/27950)
109+
- [Documentation](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-image)
110+
111+
112+
113+
### New Rich Text Implementation
114+
115+
**Breaking Change**: New rich text implementation for performance and usability. This is only a breaking change if you rely on the Rich Text Contentful field type.
116+
117+
See PR [#25249](https://github.com/gatsbyjs/gatsby/pull/25249) description for details and migration guide.
118+
119+
### Performance improvements
120+
121+
The max of `pageLimit` option was raised from `100` to `1000` (on Contentful's side) which should lead
122+
to significant reduction of remote fetching times.
123+
124+
Note that the default value for the `pageLimit` option is still `100`, so you need to change
125+
it manually in your site config to see performance improvements.
126+
127+
Due to technical limitations, the response payload size is still bound by a hard chunk download
128+
size, so it is possible you may need to use a lower value for your particular site.
129+
130+
131+
132+
There was a significant performance improvement by making a certain node fetching step lazy.
133+
This is especially noticeable at scale. See PR [#27937](https://github.com/gatsbyjs/gatsby/pull/27937) for details.
134+
135+
## Work in progress
136+
137+
### Queries on Demand
138+
139+
When developing a Gatsby site there's no need to run all graphql queries before serving the site.
140+
Instead, Gatsby could run queries for pages as they're requested by a browser.
141+
This would avoid having to wait for slower queries (like image processing) if you're editing an unrelated part of a site.
142+
143+
Try early alpha (and [let us know](https://github.com/gatsbyjs/gatsby/discussions/27620) if you have any issues with it):
144+
145+
```
146+
npm install gatsby@qod
147+
```
148+
149+
Enable in your `gatsby-config.js`:
150+
151+
```js
152+
module.exports = {
153+
// your existing configuration
154+
__experimentalQueryOnDemand: true,
155+
}
156+
```
157+
158+
[Details and discussion](https://github.com/gatsbyjs/gatsby/discussions/27620).
159+
160+
### Experimental: Lazy images in develop
161+
162+
We've got some feedback that the more image-heavy your website gets, the slower `gatsby develop`.
163+
This experimental version of `gatsby-plugin-sharp` only does image processing when the page gets requested.
164+
165+
Try early alpha (and [let us know](https://github.com/gatsbyjs/gatsby/discussions/27603) if you have any issues with it):
166+
167+
```
168+
npm install gatsby-plugin-sharp@lazy-images
169+
```
170+
171+
Lazy images are enabled by-default in this version.
172+
173+
[Details and discussion](https://github.com/gatsbyjs/gatsby/discussions/27603).
174+
175+
### Documentation Reorganization
176+
177+
We’ve heard repeatedly from the community that Gatsby is a powerful tool,
178+
but it has a steep learning curve. We want to make it easier to get started with Gatsby.
179+
And that means having documentation that helps y’all find the information you need when you need it.
180+
181+
[Announcement and discussion](https://github.com/gatsbyjs/gatsby/discussions/27856).
182+
183+
## Contributors
184+
185+
A big **Thank You** to [everyone who contributed](https://github.com/gatsbyjs/gatsby/compare/[email protected]@2.26.0) to this release 💜

e2e-tests/development-runtime/content/error-recovery/page-query.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

e2e-tests/development-runtime/content/error-recovery/static-query.json

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"selector": "page-query-404-to-B-to-404-history",
3+
"status": "before-edit"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"selector": "page-query-404-to-B-to-404-link",
3+
"status": "before-edit"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"selector": "page-query-CO-to-B-to-CO-history",
3+
"status": "before-edit"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"selector": "page-query-CO-to-B-to-CO-link",
3+
"status": "before-edit"
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"selector": "page-query-no-trailing-slash-A-to-B-to-A-history",
3+
"status": "before-edit"
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"selector": "page-query-no-trailing-slash-A-to-B-to-A-link",
3+
"status": "before-edit"
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"selector": "page-query-with-trailing-slash-A-to-B-to-A-history",
3+
"status": "before-edit"
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"selector": "page-query-with-trailing-slash-A-to-B-to-A-link",
3+
"status": "before-edit"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"selector": "static-query-404-to-B-to-404-history",
3+
"status": "before-edit"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"selector": "static-query-404-to-B-to-404-link",
3+
"status": "before-edit"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"selector": "static-query-CO-to-B-to-CO-history",
3+
"status": "before-edit"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"selector": "static-query-CO-to-B-to-CO-link",
3+
"status": "before-edit"
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"selector": "static-query-no-trailing-slash-A-to-B-to-A-history",
3+
"status": "before-edit"
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"selector": "static-query-no-trailing-slash-A-to-B-to-A-link",
3+
"status": "before-edit"
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"selector": "static-query-with-trailing-slash-A-to-B-to-A-history",
3+
"status": "before-edit"
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"selector": "static-query-with-trailing-slash-A-to-B-to-A-link",
3+
"status": "before-edit"
4+
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"baseUrl": "http://localhost:8000",
33
"failOnStatusCode": false,
4-
"chromeWebSecurity": false
4+
"chromeWebSecurity": false,
5+
"defaultCommandTimeout": 10000
56
}

0 commit comments

Comments
 (0)