Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gatsbyjs/gatsby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3c194389ada8373ad014e9ba922098f9b6040866
Choose a base ref
...
head repository: gatsbyjs/gatsby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 81680798509031532b0c572751b84f84a6d979e1
Choose a head ref
Loading
Showing 780 changed files with 20,069 additions and 16,263 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -168,6 +168,10 @@ module.exports = {
// bump to @typescript-eslint/parser started showing Flow related errors in ts(x) files
// so disabling them in .ts(x) files
"flowtype/no-types-missing-file-annotation": "off",
"@typescript-eslint/array-type": [
'error',
{ default: 'generic' },
],
},
},
],
20 changes: 0 additions & 20 deletions .github/workflows/schedule-site-showcase-validator-workflow.yml

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/schedule-stale.yml
Original file line number Diff line number Diff line change
@@ -13,23 +13,23 @@ jobs:
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DAYS_BEFORE_STALE: 20
DAYS_BEFORE_CLOSE: 10
DAYS_BEFORE_CLOSE: 40
OPERATIONS_PER_RUN: 5000
STALE_ISSUE_MESSAGE: |
Hiya!
This issue has gone quiet. Spooky quiet. 👻
We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out [gatsby.dev/contribute](https://www.gatsbyjs.org/contributing/how-to-contribute/) for more information about opening PRs, triaging issues, and contributing!
Thanks for being a part of the Gatsby community! 💪💜
CLOSE_MESSAGE: |
Hey again!
It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m `HUMAN_EMOTION_SORRY`. Please feel free to reopen this issue or create a new one if you need anything else.
It’s been 60 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m `HUMAN_EMOTION_SORRY`. Please feel free to comment on this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out [gatsby.dev/contribute](https://www.gatsbyjs.org/contributing/how-to-contribute/) for more information about opening PRs, triaging issues, and contributing!
Thanks again for being part of the Gatsby community! 💪💜
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -42,6 +42,7 @@ node_modules/
e2e-tests/gatsby-pnp/
.cache/
.netlify
.Rhistory

# IDE specific
.idea/
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p align="center">
<a href="https://gatsbyjs.org">
<img alt="Gatsby" src="https://www.gatsbyjs.org/monogram.svg" width="60" />
<a href="https://gatsbyjs.com">
<img alt="Gatsby" src="https://www.gatsbyjs.com/Gatsby-Monogram.svg" width="60" />
</a>
</p>
<h1 align="center">
@@ -32,7 +32,7 @@
<a href="https://npmcharts.com/compare/gatsby?minimal=true">
<img src="https://img.shields.io/npm/dt/gatsby.svg" alt="Total downloads on npm." />
</a>
<a href="https://gatsbyjs.org/contributing/how-to-contribute/">
<a href="https://gatsbyjs.com/contributing/how-to-contribute/">
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs welcome!" />
</a>
<a href="https://twitter.com/intent/follow?screen_name=gatsbyjs">
@@ -41,17 +41,17 @@
</p>

<h3 align="center">
<a href="https://gatsbyjs.org/docs/">Quickstart</a>
<a href="https://gatsbyjs.com/docs/">Quickstart</a>
<span> · </span>
<a href="https://gatsbyjs.org/tutorial/">Tutorial</a>
<a href="https://gatsbyjs.com/tutorial/">Tutorial</a>
<span> · </span>
<a href="https://gatsbyjs.org/plugins/">Plugins</a>
<a href="https://gatsbyjs.com/plugins/">Plugins</a>
<span> · </span>
<a href="https://gatsbyjs.org/starters/">Starters</a>
<a href="https://gatsbyjs.com/starters/">Starters</a>
<span> · </span>
<a href="https://gatsbyjs.org/showcase/">Showcase</a>
<a href="https://gatsbyjs.com/showcase/">Showcase</a>
<span> · </span>
<a href="https://gatsbyjs.org/contributing/how-to-contribute/">Contribute</a>
<a href="https://gatsbyjs.com/contributing/how-to-contribute/">Contribute</a>
<span> · </span>
Support: <a href="https://twitter.com/AskGatsbyJS">Twitter</a>
<span> & </span>
@@ -80,7 +80,7 @@ Gatsby is a modern web framework for blazing fast websites.
site on a CDN for a fraction of the cost of a server-rendered site. Many Gatsby sites can be
hosted entirely free on services like GitHub Pages and Netlify.

[**Learn how to use Gatsby for your next project.**](https://gatsbyjs.org/docs/)
[**Learn how to use Gatsby for your next project.**](https://gatsbyjs.com/docs/)

## What’s In This Document

@@ -124,36 +124,36 @@ You can get a new Gatsby site up and running on your local dev environment in 5

Your site is now running at `http://localhost:8000`. Open the `my-blazing-fast-site` directory in your code editor of choice and edit `src/pages/index.js`. Save your changes, and the browser will update in real time!

At this point, you’ve got a fully functional Gatsby website. For additional information on how you can customize your Gatsby site, see our [plugins](https://gatsbyjs.org/plugins/) and [the official tutorial](https://gatsbyjs.org/tutorial/).
At this point, you’ve got a fully functional Gatsby website. For additional information on how you can customize your Gatsby site, see our [plugins](https://gatsbyjs.com/plugins/) and [the official tutorial](https://gatsbyjs.com/tutorial/).

## 🎓 Learning Gatsby

Full documentation for Gatsby lives [on the website](https://gatsbyjs.org/).
Full documentation for Gatsby lives [on the website](https://gatsbyjs.com/).

- **For most developers, we recommend starting with our [in-depth tutorial for creating a site with Gatsby](https://gatsbyjs.org/tutorial/).** It starts with zero assumptions about your level of ability and walks through every step of the process.
- **For most developers, we recommend starting with our [in-depth tutorial for creating a site with Gatsby](https://gatsbyjs.com/tutorial/).** It starts with zero assumptions about your level of ability and walks through every step of the process.

- **To dive straight into code samples head [to our documentation](https://gatsbyjs.org/docs/).** In particular, check out the “<i>Guides</i>”, “<i>API Reference</i>”, and “<i>Advanced Tutorials</i>” sections in the sidebar.
- **To dive straight into code samples head [to our documentation](https://gatsbyjs.com/docs/).** In particular, check out the “<i>Guides</i>”, “<i>API Reference</i>”, and “<i>Advanced Tutorials</i>” sections in the sidebar.

We welcome suggestions for improving our docs. See the [“how to contribute”](https://gatsbyjs.org/contributing/how-to-contribute/) documentation for more details.
We welcome suggestions for improving our docs. See the [“how to contribute”](https://gatsbyjs.com/contributing/how-to-contribute/) documentation for more details.

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

## 💼 Migration Guides

Already have a Gatsby site? These handy guides will help you add the improvements of Gatsby v2 to your site without starting from scratch!

- [Migrate a Gatsby site from v1 to v2](https://gatsbyjs.org/docs/migrating-from-v1-to-v2/)
- Still on v0? Start here: [Migrate a Gatsby site from v0 to v1](https://gatsbyjs.org/docs/migrating-from-v0-to-v1/)
- [Migrate a Gatsby site from v1 to v2](https://gatsbyjs.com/docs/migrating-from-v1-to-v2/)
- Still on v0? Start here: [Migrate a Gatsby site from v0 to v1](https://gatsbyjs.com/docs/migrating-from-v0-to-v1/)

## ❗ Code of Conduct

Gatsby is dedicated to building a welcoming, diverse, safe community. We expect everyone participating in the Gatsby community to abide by our [**Code of Conduct**](https://gatsbyjs.org/contributing/code-of-conduct/). Please read it. Please follow it. In the Gatsby community, we work hard to build each other up and create amazing things together. 💪💜
Gatsby is dedicated to building a welcoming, diverse, safe community. We expect everyone participating in the Gatsby community to abide by our [**Code of Conduct**](https://gatsbyjs.com/contributing/code-of-conduct/). Please read it. Please follow it. In the Gatsby community, we work hard to build each other up and create amazing things together. 💪💜

## 🤝 How to Contribute

Whether you're helping us fix bugs, improve the docs, or spread the word, we'd love to have you as part of the Gatsby community! :muscle::purple_heart:

Check out our [**Contributing Guide**](https://gatsbyjs.org/contributing/how-to-contribute/) for ideas on contributing and setup steps for getting our repositories up and running on your local machine.
Check out our [**Contributing Guide**](https://gatsbyjs.com/contributing/how-to-contribute/) for ideas on contributing and setup steps for getting our repositories up and running on your local machine.

### A note on how this repository is organized

@@ -169,4 +169,4 @@ Licensed under the [MIT License](./LICENSE).

## 💜 Thanks

Thanks to our many contributors and to [Netlify](https://www.netlify.com/) for hosting [gatsbyjs.org](https://gatsbyjs.org) and our example sites.
Thanks to our many contributors and to [Netlify](https://www.netlify.com/) for hosting [gatsbyjs.com](https://gatsbyjs.com) and our example sites.
71 changes: 71 additions & 0 deletions benchmarks/gabe-markdown/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# dotenv environment variable files
.env*

# gatsby files
.cache/
public

# Mac files
.DS_Store

# Yarn
yarn-error.log
.pnp/
.pnp.js
# Yarn Integrity file
.yarn-integrity

generated_articles
21 changes: 21 additions & 0 deletions benchmarks/gabe-markdown/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015 Gatsbyjs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
28 changes: 28 additions & 0 deletions benchmarks/gabe-markdown/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Markdown Benchmark

This is a baseline benchmark for tracking Markdown performance in the Gabe project.

The site can generate an arbitrary amount of super simple pages. Each page has a small header, a quote, and two small paragraphs of random text. No images, because we want to benchmark Markdown.

This uses the local file system plugin, though we might switch to sourcing from csv since that has a more efficient internal representation (fewer `File` nodes).

## Install

Run `yarn` or `npm install`

## Usage

You can start a benchmark run like this:

```shell
N=1000 M=2 yarn bench
```

- `N=1000`: instructs the run to build a site of 1000 pages
- `M=2`: instructs nodejs to use up to 2gb of memory for its long term storage
- Deletes generates files from previous run
- Generates `N` pages with pseudo-random content
- Runs `gatsby clean`
- Runs `gatsby build`

The default `yarn bench` will build 512 pages with 1gb memory.
Empty file.
17 changes: 17 additions & 0 deletions benchmarks/gabe-markdown/gatsby-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
siteMetadata: {
title: `Gatsby Markdown Benchmark for Gabe`,
description: "A blog like no other blog",
author: "Bob the Blogger",
},
plugins: [
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/generated_articles`,
name: `blog`,
},
},
`gatsby-transformer-remark`,
],
}
62 changes: 62 additions & 0 deletions benchmarks/gabe-markdown/gatsby-node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
const path = require(`path`)
const { createFilePath } = require(`gatsby-source-filesystem`)

exports.createPages = async ({ graphql, actions }) => {
const { createPage } = actions
const blogPost = path.resolve(`./src/templates/blog-post.js`)
const result = await graphql(
`
{
allMarkdownRemark(sort: { fields: [frontmatter___date], order: DESC }) {
edges {
node {
id
fields {
slug
}
frontmatter {
title
}
}
}
}
}
`
)

if (result.errors) {
throw result.errors
}

// Create blog posts pages.
const posts = result.data.allMarkdownRemark.edges

posts.forEach((post, index) => {
const previous = index === posts.length - 1 ? null : posts[index + 1].node
const next = index === 0 ? null : posts[index - 1].node

createPage({
path: post.node.fields.slug,
component: blogPost,
context: {
slug: post.node.fields.slug,
id: post.node.id,
previous,
next,
},
})
})
}

exports.onCreateNode = ({ node, actions, getNode }) => {
const { createNodeField } = actions

if (node.internal.type === `MarkdownRemark`) {
const value = createFilePath({ node, getNode })
createNodeField({
name: `slug`,
node,
value,
})
}
}
Loading