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: a6b1513e657e2f0cbdf7626fa0584d7353be8fba
Choose a base ref
...
head repository: gatsbyjs/gatsby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9f4c0b92d8da3d3f0ccd75efd91ed4f44669d303
Choose a head ref

Commits on Sep 8, 2022

  1. chore(release): Publish next pre-minor

     - babel-plugin-remove-graphql-queries@4.24.0-next.0
     - babel-preset-gatsby-package@2.24.0-next.0
     - babel-preset-gatsby@2.24.0-next.0
     - create-gatsby@2.24.0-next.0
     - gatsby-cli@4.24.0-next.0
     - gatsby-codemods@3.24.0-next.0
     - gatsby-core-utils@3.24.0-next.0
     - gatsby-cypress@2.24.0-next.0
     - gatsby-design-tokens@4.24.0-next.0
     - gatsby-dev-cli@4.24.0-next.0
     - gatsby-graphiql-explorer@2.24.0-next.0
     - gatsby-legacy-polyfills@2.24.0-next.0
     - gatsby-link@4.24.0-next.0
     - gatsby-page-utils@2.24.0-next.0
     - gatsby-parcel-config@0.15.0-next.0
     - @gatsbyjs/parcel-namer-relative-to-cwd@1.9.0-next.0
     - gatsby-plugin-benchmark-reporting@2.24.0-next.0
     - gatsby-plugin-canonical-urls@4.24.0-next.0
     - gatsby-plugin-catch-links@4.24.0-next.0
     - gatsby-plugin-coffeescript@4.24.0-next.0
     - gatsby-plugin-cxs@4.24.0-next.0
     - gatsby-plugin-emotion@7.24.0-next.0
     - gatsby-plugin-facebook-analytics@4.24.0-next.0
     - gatsby-plugin-feed@4.24.0-next.0
     - gatsby-plugin-flow@3.24.0-next.0
     - gatsby-plugin-fullstory@4.24.0-next.0
     - gatsby-plugin-gatsby-cloud@4.24.0-next.0
     - gatsby-plugin-google-analytics@4.24.0-next.0
     - gatsby-plugin-google-gtag@4.24.0-next.0
     - gatsby-plugin-google-tagmanager@4.24.0-next.0
     - gatsby-plugin-image@2.24.0-next.0
     - gatsby-plugin-jss@4.24.0-next.0
     - gatsby-plugin-layout@3.24.0-next.0
     - gatsby-plugin-less@6.24.0-next.0
     - gatsby-plugin-lodash@5.24.0-next.0
     - gatsby-plugin-manifest@4.24.0-next.0
     - gatsby-plugin-mdx@4.3.0-next.0
     - gatsby-plugin-netlify-cms@6.24.0-next.0
     - gatsby-plugin-no-sourcemaps@4.24.0-next.0
     - gatsby-plugin-nprogress@4.24.0-next.0
     - gatsby-plugin-offline@5.24.0-next.0
     - gatsby-plugin-page-creator@4.24.0-next.0
     - gatsby-plugin-postcss@5.24.0-next.0
     - gatsby-plugin-preact@6.24.0-next.0
     - gatsby-plugin-preload-fonts@3.24.0-next.0
     - gatsby-plugin-react-css-modules@4.24.0-next.0
     - gatsby-plugin-react-helmet@5.24.0-next.0
     - gatsby-plugin-sass@5.24.0-next.0
     - gatsby-plugin-schema-snapshot@3.24.0-next.0
     - gatsby-plugin-sharp@4.24.0-next.0
     - gatsby-plugin-sitemap@5.24.0-next.0
     - gatsby-plugin-styled-components@5.24.0-next.0
     - gatsby-plugin-styled-jsx@5.24.0-next.0
     - gatsby-plugin-styletron@7.24.0-next.0
     - gatsby-plugin-stylus@4.24.0-next.0
     - gatsby-plugin-subfont@4.24.0-next.0
     - gatsby-plugin-twitter@4.24.0-next.0
     - gatsby-plugin-typescript@4.24.0-next.0
     - gatsby-plugin-typography@4.24.0-next.0
     - gatsby-plugin-utils@3.18.0-next.0
     - gatsby-react-router-scroll@5.24.0-next.0
     - gatsby-remark-autolink-headers@5.24.0-next.0
     - gatsby-remark-code-repls@6.24.0-next.0
     - gatsby-remark-copy-linked-files@5.24.0-next.0
     - gatsby-remark-custom-blocks@4.24.0-next.0
     - gatsby-remark-embed-snippet@7.24.0-next.0
     - gatsby-remark-graphviz@4.24.0-next.0
     - gatsby-remark-images-contentful@5.24.0-next.0
     - gatsby-remark-images@6.24.0-next.0
     - gatsby-remark-katex@6.24.0-next.0
     - gatsby-remark-prismjs@6.24.0-next.0
     - gatsby-remark-responsive-iframe@5.24.0-next.0
     - gatsby-remark-smartypants@5.24.0-next.0
     - gatsby-script@1.9.0-next.0
     - gatsby-sharp@0.18.0-next.0
     - gatsby-source-contentful@7.22.0-next.0
     - gatsby-source-drupal@5.25.0-next.0
     - gatsby-source-faker@4.24.0-next.0
     - gatsby-source-filesystem@4.24.0-next.0
     - gatsby-source-graphql@4.24.0-next.0
     - gatsby-source-hacker-news@4.24.0-next.0
     - gatsby-source-lever@4.24.0-next.0
     - gatsby-source-medium@4.24.0-next.0
     - gatsby-source-mongodb@4.24.0-next.0
     - gatsby-source-npm-package-search@4.24.0-next.0
     - gatsby-source-shopify@7.13.0-next.0
     - gatsby-source-wikipedia@4.24.0-next.0
     - gatsby-source-wordpress@6.24.0-next.0
     - gatsby-telemetry@3.24.0-next.0
     - gatsby-transformer-asciidoc@3.24.0-next.0
     - gatsby-transformer-csv@4.24.0-next.0
     - gatsby-transformer-documentationjs@6.24.0-next.0
     - gatsby-transformer-excel@4.24.0-next.0
     - gatsby-transformer-hjson@4.24.0-next.0
     - gatsby-transformer-javascript-frontmatter@4.24.0-next.0
     - gatsby-transformer-javascript-static-exports@4.24.0-next.0
     - gatsby-transformer-json@4.24.0-next.0
     - gatsby-transformer-pdf@3.24.0-next.0
     - gatsby-transformer-react-docgen@7.24.0-next.0
     - gatsby-transformer-remark@5.24.0-next.0
     - gatsby-transformer-screenshot@4.24.0-next.0
     - gatsby-transformer-sharp@4.24.0-next.0
     - gatsby-transformer-sqip@4.24.0-next.0
     - gatsby-transformer-toml@4.24.0-next.0
     - gatsby-transformer-xml@4.24.0-next.0
     - gatsby-transformer-yaml@4.24.0-next.0
     - gatsby-worker@1.24.0-next.0
     - gatsby@4.24.0-next.0
    tyhopp committed Sep 8, 2022
    Copy the full SHA
    ba43263 View commit details
  2. fix(gatsby-link): Correct handling of trailingSlash & pathPrefix (#36542

    )
    
    Co-authored-by: AndreiPiatrou <19graff91@gmail.com>
    Andrey Petrov and AndreiPiatrou authored Sep 8, 2022
    Copy the full SHA
    85b1319 View commit details
  3. Copy the full SHA
    8d703ef View commit details
  4. chore(release): Publish next

     - gatsby-link@4.24.0-next.1
     - gatsby@4.24.0-next.1
    LekoArts committed Sep 8, 2022
    Copy the full SHA
    0b94fa6 View commit details

Commits on Sep 9, 2022

  1. chore: Bump min Node version to 18 (#36560)

    * gatsby-cli rollup change
    
    * patch file
    
    * revert rollup change
    
    * rollup change
    LekoArts authored Sep 9, 2022
    Copy the full SHA
    8a01270 View commit details
  2. Copy the full SHA
    05b7ba5 View commit details
  3. chore(docs): Update "Layout components" related links (#36572)

    Co-authored-by: Lennart <lekoarts@gmail.com>
    evanwinter and LekoArts authored Sep 9, 2022
    Copy the full SHA
    ca0dbd8 View commit details
  4. Copy the full SHA
    12954d5 View commit details
  5. fix(deps): update starters and examples - gatsby (#36578)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Sep 9, 2022
    Copy the full SHA
    e174fbb View commit details

Commits on Sep 12, 2022

  1. Copy the full SHA
    b1b83c1 View commit details
  2. fix(deps): update starters and examples (#36592)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Sep 12, 2022
    Copy the full SHA
    d6c8f4b View commit details
  3. chore(docs): Fix Seo imports in tutorial (#36587)

    Co-authored-by: Lennart <lekoarts@gmail.com>
    Osiris8 and LekoArts authored Sep 12, 2022
    Copy the full SHA
    1a8c5d5 View commit details
  4. chore(gatsby-plugin-sitemap): Add info about page object to README (#…

    …36582)
    
    Co-authored-by: LekoArts <lekoarts@gmail.com>
    alesma and LekoArts authored Sep 12, 2022
    Copy the full SHA
    b005669 View commit details
  5. chore(gatsby): Add loadPageDataSync property to onRenderBody TS t…

    …ype (#36492)
    
    * feat(gatsby): expose loadPageDataSync
    
    According to #35841 (reply in thread) there is a `loadPageDataSync` function, which returns the page context to the corresponding `pathname`. So far this was not reflected in the type definitions, what is changed with this PR.
    
    * chore(typing): remove generic context
    
    Remove generic context as it can be different for each pathname.
    openscript authored Sep 12, 2022
    Copy the full SHA
    696427e View commit details

Commits on Sep 13, 2022

  1. Copy the full SHA
    34df27a View commit details
  2. chore(release): Publish next

     - gatsby-plugin-mdx@4.3.0-next.1
     - gatsby-plugin-sitemap@5.24.0-next.1
     - gatsby@4.24.0-next.2
    LekoArts committed Sep 13, 2022
    Copy the full SHA
    1f41812 View commit details
  3. chore(docs): Release Notes for 4.23 (#36574)

    * chore(docs): Release Notes for 4.23
    
    * Add highlights
    
    * Add notable fixes, improvements
    
    * Add contributor thanks
    
    Co-authored-by: tyhopp <hopp.ty.c@gmail.com>
    gatsbybot and tyhopp authored Sep 13, 2022
    Copy the full SHA
    5e3a04d View commit details
  4. fix(gatsby): Pass hostname to detect-port (#36496)

    Co-authored-by: Lennart <lekoarts@gmail.com>
    treboryx and LekoArts authored Sep 13, 2022
    Copy the full SHA
    9ea3129 View commit details

Commits on Sep 14, 2022

  1. Copy the full SHA
    e69348a View commit details
  2. Copy the full SHA
    6942f5f View commit details
  3. Copy the full SHA
    53a4e5a View commit details
  4. fix(deps): update starters and examples - gatsby (#36603)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Sep 14, 2022
    Copy the full SHA
    186e33d View commit details
  5. chore: allow react/react-dom@experimental (#36533)

    Co-authored-by: Lennart <lekoarts@gmail.com>
    wardpeet and LekoArts authored Sep 14, 2022
    Copy the full SHA
    7ef4a3f View commit details
  6. feat(gatsby-remark-copy-linked-files): Add absolutePath to dir func…

    …tion (#36213)
    
    Co-authored-by: Karl Horky <karl.horky@gmail.com>
    Co-authored-by: Lennart <lekoarts@gmail.com>
    karlhorky and LekoArts authored Sep 14, 2022
    Copy the full SHA
    f141c59 View commit details
  7. chore(release): Publish next

     - gatsby-link@4.24.0-next.2
     - gatsby-plugin-cxs@4.24.0-next.1
     - gatsby-plugin-feed@4.24.0-next.1
     - gatsby-plugin-fullstory@4.24.0-next.1
     - gatsby-plugin-google-analytics@4.24.0-next.1
     - gatsby-plugin-google-gtag@4.24.0-next.1
     - gatsby-plugin-google-tagmanager@4.24.0-next.1
     - gatsby-plugin-image@2.24.0-next.1
     - gatsby-plugin-jss@4.24.0-next.1
     - gatsby-plugin-mdx@4.3.0-next.2
     - gatsby-plugin-netlify-cms@6.24.0-next.1
     - gatsby-plugin-offline@5.24.0-next.1
     - gatsby-plugin-sharp@4.24.0-next.1
     - gatsby-plugin-sitemap@5.24.0-next.2
     - gatsby-plugin-styled-components@5.24.0-next.1
     - gatsby-plugin-typography@4.24.0-next.1
     - gatsby-react-router-scroll@5.24.0-next.1
     - gatsby-remark-autolink-headers@5.24.0-next.1
     - gatsby-remark-copy-linked-files@5.24.0-next.1
     - gatsby-script@1.9.0-next.1
     - gatsby-source-shopify@7.13.0-next.1
     - gatsby-source-wordpress@6.24.0-next.1
     - gatsby-transformer-sqip@4.24.0-next.1
     - gatsby@4.24.0-next.3
    LekoArts committed Sep 14, 2022
    Copy the full SHA
    6815536 View commit details

Commits on Sep 15, 2022

  1. chore(docs): Fix Partytown forward events examples (#36613)

    * chore(docs): Fix Partytown forward events examples
    
    * chore(docs): Add `page_path`
    kvnang authored Sep 15, 2022
    Copy the full SHA
    4e276cf View commit details
  2. Copy the full SHA
    32a8b88 View commit details
  3. chore(docs): Add "Payments Managing" & "Deploying to Fastly" (#36546)

    Co-authored-by: Lennart <lekoarts@gmail.com>
    Co-authored-by: Josh Johnson <jcjohnson77@gmail.com>
    Co-authored-by: “Marcus <“mcolelittle”@gmail.com>
    Co-authored-by: Dustin Schau <DSchau@users.noreply.github.com>
    5 people authored Sep 15, 2022
    Copy the full SHA
    9714823 View commit details

Commits on Sep 16, 2022

  1. Copy the full SHA
    bbc6e2e View commit details
  2. Copy the full SHA
    e63e111 View commit details
  3. Copy the full SHA
    71e81fc View commit details
  4. Copy the full SHA
    8b9e3ea View commit details
  5. Copy the full SHA
    7e6e394 View commit details
  6. Copy the full SHA
    67fa4b4 View commit details
  7. fix(gatsby): fix bundling image cdn tools (#36534)

    Co-authored-by: Ward Peeters <ward@coding-tech.com>
    Co-authored-by: Lennart <lekoarts@gmail.com>
    3 people authored Sep 16, 2022
    Copy the full SHA
    0ef331d View commit details

Commits on Sep 17, 2022

  1. fix(docs): tiny grammatical correction (#36630)

    fix: doc: tiny grammatical correction
    benomatis authored Sep 17, 2022
    Copy the full SHA
    e91d5a6 View commit details

Commits on Sep 19, 2022

  1. chore(deps): update starters and examples to ^18.0.20 (#36637)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Sep 19, 2022
    Copy the full SHA
    f989f27 View commit details
  2. Copy the full SHA
    c500314 View commit details
  3. Copy the full SHA
    992dd05 View commit details
  4. chore(docs): Add wrapRootElement + Head API limitation (#36580)

    Co-authored-by: Lennart <lekoarts@gmail.com>
    marvinjude and LekoArts authored Sep 19, 2022
    Copy the full SHA
    b029564 View commit details
  5. Copy the full SHA
    a922943 View commit details
  6. fix(gatsby-parcel-config): Adjust dependencies (#36583)

    Co-authored-by: Lennart <lekoarts@gmail.com>
    ebuildy and LekoArts authored Sep 19, 2022
    Copy the full SHA
    9e3f160 View commit details

Commits on Sep 20, 2022

  1. Copy the full SHA
    5b3b565 View commit details
  2. Copy the full SHA
    a9b2de8 View commit details
  3. Copy the full SHA
    efdd4a2 View commit details

Commits on Sep 21, 2022

  1. chore(release): Publish next

     - create-gatsby@2.24.0-next.1
     - gatsby-cli@4.24.0-next.1
     - gatsby-parcel-config@0.15.0-next.1
     - gatsby-plugin-cxs@4.24.0-next.2
     - gatsby-plugin-feed@4.24.0-next.2
     - gatsby-plugin-flow@3.24.0-next.1
     - gatsby-plugin-google-tagmanager@4.24.0-next.2
     - gatsby-plugin-image@2.24.0-next.2
     - gatsby-plugin-manifest@4.24.0-next.1
     - gatsby-plugin-mdx@4.3.0-next.3
     - gatsby-plugin-offline@5.24.0-next.2
     - gatsby-plugin-page-creator@4.24.0-next.1
     - gatsby-plugin-sass@5.24.0-next.1
     - gatsby-plugin-sharp@4.24.0-next.2
     - gatsby-plugin-sitemap@5.24.0-next.3
     - gatsby-plugin-twitter@4.24.0-next.1
     - gatsby-plugin-utils@3.18.0-next.1
     - gatsby-remark-autolink-headers@5.24.0-next.2
     - gatsby-remark-images@6.24.0-next.1
     - gatsby-script@1.9.0-next.2
     - gatsby-sharp@0.18.0-next.1
     - gatsby-source-contentful@7.22.0-next.1
     - gatsby-source-drupal@5.25.0-next.1
     - gatsby-source-shopify@7.13.0-next.2
     - gatsby-source-wordpress@6.24.0-next.2
     - gatsby-transformer-remark@5.24.0-next.1
     - gatsby-transformer-sharp@4.24.0-next.1
     - gatsby-transformer-sqip@4.24.0-next.2
     - gatsby@4.24.0-next.4
    LekoArts committed Sep 21, 2022
    Copy the full SHA
    ea00e12 View commit details
  2. Copy the full SHA
    7b683dd View commit details
  3. Copy the full SHA
    e8ed8a1 View commit details
  4. chore(docs): Update storybook main.js docs (#36627)

    Co-authored-by: Lennart <lekoarts@gmail.com>
    Chris Skinner and LekoArts authored Sep 21, 2022
    Copy the full SHA
    cc7115e View commit details
  5. Copy the full SHA
    5110a94 View commit details
Showing 387 changed files with 11,111 additions and 7,886 deletions.
10 changes: 0 additions & 10 deletions docs/docs/cheat-sheet.md
Original file line number Diff line number Diff line change
@@ -104,16 +104,6 @@ Get the PDF: <a href="/gatsby-cheat-sheet.pdf" download>gatsby-cheat-sheet.pdf</
</p>
</td>
</tr>
<tr>
<td>
<p>Quick Reference Guide</p>
</td>
<td>
<p>
<a href="https://gatsby.dev/recipes">gatsby.dev/recipes</a>
</p>
</td>
</tr>
<tr>
<td>
<p>Adding Images</p>
2 changes: 1 addition & 1 deletion docs/docs/conceptual/react-hydration.md
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ This means that the browser can "pick up" where the server left off with the con

## Transfer rendering to the React reconciler

After ReactDOM hydrates the content, the [React reconciler](https://reactjs.org/docs/reconciliation.html) can take over and [diff](https://en.m.wikipedia.org/wiki/Diff) the tree of elements. It then becomes responsible for making updates in the UI based on changing state or props.
After ReactDOM hydrates the content, the [React reconciler](https://reactjs.org/docs/reconciliation.html) can take over and [diff](https://en.wikipedia.org/wiki/Diff) the tree of elements. It then becomes responsible for making updates in the UI based on changing state or props.

## Additional resources

2 changes: 1 addition & 1 deletion docs/docs/conceptual/rendering-options.md
Original file line number Diff line number Diff line change
@@ -72,7 +72,7 @@ It implies a different deployment model and requires backend infrastructure. But

SSG, DSG, and client-side rendering can handle a vast majority of use cases in web development. But there is a small niche when you may still need to generate HTML on-the-fly. That's when you'll need Server-Side Rendering.

Server-Side Rendering is a method of content rendering in which each web page is served to a site visitor at runtime, meaning that a portion of the build process happens on each page request. Because the content is rendering during runtime, visitors will always get the latest version of content directly from the server—though they may have to wait a few seconds for it display.
Server-Side Rendering is a method of content rendering in which each web page is served to a site visitor at runtime, meaning that a portion of the build process happens on each page request. Because the content is rendering during runtime, visitors will always get the latest version of content directly from the server—though they may have to wait a few seconds for it to display.

For example, imagine you are building a site with user reviews. You want those reviews to be immediately indexed by search engines as soon as they are posted, so client-side rendering is not an option.

16 changes: 16 additions & 0 deletions docs/docs/debugging-the-build-process.md
Original file line number Diff line number Diff line change
@@ -95,6 +95,10 @@ We won't go in depth here about how to debug in VS Code - for that you can check
"request": "launch",
"program": "${workspaceRoot}/node_modules/.bin/gatsby",
"args": ["develop"],
"env": {
"PARCEL_WORKERS": "0",
"GATSBY_CPU_COUNT": "1",
},
"runtimeArgs": ["--nolazy"],
"console": "integratedTerminal"
},
@@ -104,6 +108,10 @@ We won't go in depth here about how to debug in VS Code - for that you can check
"request": "launch",
"program": "${workspaceRoot}/node_modules/.bin/gatsby",
"args": ["build"],
"env": {
"PARCEL_WORKERS": "0",
"GATSBY_CPU_COUNT": "1",
},
"runtimeArgs": ["--nolazy"],
"console": "integratedTerminal"
}
@@ -126,6 +134,10 @@ We won't go in depth here about how to debug in VS Code - for that you can check
"program": "${workspaceRoot}/node_modules/gatsby/dist/bin/gatsby"
},
"args": ["develop"],
"env": {
"PARCEL_WORKERS": "0",
"GATSBY_CPU_COUNT": "1",
},
"runtimeArgs": ["--nolazy"],
"console": "integratedTerminal"
},
@@ -138,6 +150,10 @@ We won't go in depth here about how to debug in VS Code - for that you can check
"program": "${workspaceRoot}/node_modules/gatsby/dist/bin/gatsby"
},
"args": ["build"],
"env": {
"PARCEL_WORKERS": "0",
"GATSBY_CPU_COUNT": "1",
},
"runtimeArgs": ["--nolazy"],
"console": "integratedTerminal"
}
4 changes: 4 additions & 0 deletions docs/docs/glossary.md
Original file line number Diff line number Diff line change
@@ -296,6 +296,10 @@ A code library (written with [JavaScript](#javascript)) for building user interf

A parser to translate [Markdown](#markdown) to other formats like [HTML](#html) or [React](#react) code.

### Run Script

An executable command defined in the `scripts` property of your `package.json` file. See [npm](https://docs.npmjs.com/cli/v8/using-npm/scripts) and [yarn](https://classic.yarnpkg.com/lang/en/docs/cli/run/) run script documentation for more information.

### Runtime

Runtime is when a program is running (or being executable); it can refer to a few things. [Node.js](#nodejs) is a [server-side](#server-side) runtime that executes JavaScript code. [Client-side JavaScript](#client-side), on the other hand, refers to the browser runtime where traditional JavaScript code executes. Gatsby compiles your site at [build time](#build) and [rehydrates with a React runtime](#hydration) to provide a fast, interactive, and dynamic user experience.
62 changes: 62 additions & 0 deletions docs/docs/how-to/cloud/deploying-to-fastly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
title: "Deploying to Fastly on Gatsby Cloud"
description: "Learn how to deploy your Gatsby Cloud site to Fastly"
---

Gatsby Cloud is a performant cloud infrastructure for building your Gatsby site. Even better, it integrates with Content Delivery Networks (CDNs) like [Fastly](https://www.fastly.com/), so you can build and deploy your site seamlessly.

## Prerequisites

This guide assumes you already have:

- A Fastly account
- A site created on Gatsby Cloud

You can use either of the following site creation options if you don't have one already:

- [Create a Site from a Template](/docs/how-to/cloud/create-site-from-template)
- [Create a Site from a Repository](/docs/how-to/cloud/create-site-from-repository)

## Setting up a hosting integration

Once your site is available inside Gatsby Cloud, you can navigate to the "Site Settings" tab.

Inside the "Site Settings" select **"Hosting"** and scroll down to the Fastly logo. Click the **"Connect"** button to the right of that logo:

![Fastly hosting option in Gatsby Cloud](../../images/fastly-logo.png)

## Creating a deployment target

Gatsby Cloud autoconfigures Fastly for you; all it needs is an API Token!

To generate the token, you need to create a Fastly account. Once authenticated, navigate to your **"Account"**. Under your "Personal Profile" select **"Personal API Tokens"** and press the **"Create Token"** button.

For Service Access, specify the service you want the API token to be able to control or "All Services." For Scope, specify **"Global API access."** Global API access is necessary because our Fastly integration needs this to write custom VCL.

Once you create the token, be sure to copy it down as Fastly will not provide it to you again.

On the "Fastly Integration" screen, you'll be prompted for four pieces of information. Other than the API Token, these items do not need to be pre-configured in Fastly. Gatsby Cloud will create and configure the deployment target for you.

- API Token: This is what you previously created inside Fastly.
- Service Name: Choose whichever name you like so long as it does not conflict with existing Fastly services under your account.
- Hostname: This should match your intended domain name.
- Force TLS/SSL: Use this setting to enable your deployed site to force TLS/SSL. This is off by default.

Wait for your build to complete. If you navigate to your Fastly dashboard, you should see the new service. Note that you may need to refresh the page first. Your service should now be configured with a Host and Domain, and it will be Active.

Navigate to your new Fastly service by clicking on the “version” linked from the dashboard. On this screen, it will list your domains; notice the “Test domain” button. Click on this to view your site. If you’re ready to route traffic to your site, [configure your DNS settings in Fastly](https://docs.fastly.com/en/guides/adding-cname-records#updating-the-cname-record-with-your-dns-provider).

## Setting up HTTPS

You may also want to configure HTTPS for your site. You can follow the instructions provided by Fastly to set this up. This step requires Fastly to verify your domain ownership and may take up to an hour. This requires a paid Fastly account.

Once the certificate is generated, you’ll need to [configure your DNS records to serve HTTPS traffic](https://docs.fastly.com/en/guides/serving-https-traffic-using-fastly-managed-certificates#pointing-dns-to-serve-https-traffic).

HTTPS Configuration is considered separate from your Service configuration and therefore is not subject to the [overwrite rules](https://support.gatsbyjs.com/hc/en-us/articles/360053098873-Deploying-to-Fastly#i-want-to-configure-additional-settings-inside-fastly-can-i-do-that).

## Finishing Up

And that’s it! Your site is now set up to build and deploy. Gatsby Cloud will handle everything for you. Note that you can only have one hosting integration. If you choose to configure another provider, that will override your existing Fastly integration. A few things to note:

- Fastly limits users to 10 services. If your Gatsby Cloud integration sends you over that limit it will not appear in Fastly.
- At this time the configuration is reset each time your site is built. Additional custom configurations inside Fastly will be overridden.
57 changes: 57 additions & 0 deletions docs/docs/how-to/cloud/managing-invoices-and-payments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: "Managing Invoices and Payments"
description: "Learn how to manage your invoices and billing data within Gatsby Cloud"
---

You can manage invoices and payments for your organization directly from the organization dashboard. This includes:

- Updating your payment method (for subscriptions paid by card only).
- Viewing your billing portal (to edit billing info and review history).

To access these options, navigate to **"Workspace Settings."**

![Gatsby Cloud workspace settings tab](../../images/workspace-settings-tab.png)

## Update your payment information

Under the "Payment method" section, select **"Update payment method."**

![Update payment method button](../../images//update-payment-method.png)

Next, enter your card information and click the **"Update payment method"** button to complete your changes.

![Credit card details screen](../../images/credit-card-details-screen.png)

## View your billing portal

From your billing portal, you can access everything related to your subscription. To view the billing portal, click the **"Visit Portal"** button under "Payment history".

![Visit portal button](../../images/visit-portal.png)

The portal allows you to:

1. Update billing information such as your email, address, phone, tax ID, etc.
1. View and download recent invoices and receipts.
1. Pay open invoices manually.

![Billing portal screen](../../images/billing-portal-screen.png)

### Update billing information

To update billing information, select **"Update information"**. From there you can enter your information, then click **"Save"** to confirm the changes.

![Update billing information screen](../../images/billing-information-screen.png)

### View your invoice history

Under the "Invoice History" section, you can select the date for the invoice to view it. Open invoices will be labeled as "Open". Older invoices can be retrieved by clicking **"View more"**.

![Historical invoices in payment portal](../../images/invoice-history-section.png)

### Pay open invoices

When viewing an invoice, a separate window will open where you can pay (if unpaid). **"Click View invoice"** details to view details. Click the document icon to download the invoice.

![Portal to pay open invoices in Gatsby Cloud](../../images/invoice-payment-portal.png)

After an invoice is paid, you'll be able to download a receipt.
17 changes: 8 additions & 9 deletions docs/docs/how-to/cloud/working-with-redirects-and-rewrites.md
Original file line number Diff line number Diff line change
@@ -7,18 +7,17 @@ description: "Learn how to leverage redirects, rewrites, and reverse proxies in

Redirects are settings in the network layer that allow you to route traffic from one url path to another with little to no disruption.

For instance, while rebuilding your cooking blog, you might want to move all of your recipes from their old path of blog/recipes to a new path of recipes. To make sure that all the existing links to your recipes still work, you would need a way to redirect your users from blog/recipes/mouthwatering-lasagna to recipes/mouthwatering-lasagna. No one wants to lose access to such a, well, mouthwatering recipe.
For instance, while rebuilding your cooking blog, you might want to move all of your recipes from their old path of `blog/recipes` to a new path of recipes. To make sure that all the existing links to your recipes still work, you would need a way to redirect your users from `blog/recipes/mouthwatering-lasagna` to `recipes/mouthwatering-lasagna`. No one wants to lose access to such a, well, mouthwatering recipe.

## Prerequisites

1. In order to use redirects, you must include the gatsby-plugin-gatsby-cloud in your project.
1. If your Gatsby project doesn't already have a gatsby-node.js file, add one at that top level of your project (alongside your gatsby-config.js).
- If your Gatsby project doesn't already have a `gatsby-node.js` file, add one at that top level of your project (alongside your `gatsby-config.js`).

## Directions

1. In `gatsby-node.js`, export the `createPages` method and use the `createRedirects` action to generate any redirects that you want to add. Here's an example showing the lasagna recipe above:

```javascript:title=gatsby-node.js
```js:title=gatsby-node.js
exports.createPages = async ({ graphql, actions }) => {
const { createRedirect } = actions

@@ -29,12 +28,13 @@ exports.createPages = async ({ graphql, actions }) => {
}
```

2 . Once you've made these changes and deployed the changes through Gatsby Cloud, you should be able to test your changes once the CDN cache has been purged.
2. Once you've made these changes and deployed the changes through Gatsby Cloud, you should be able to test your changes once the CDN cache has been purged.

## Advanced use cases

Wildcard Path Redirects
In our example above, you've explicitly redirected one of your recipe urls, and after adding a few others, you realize that you won't have time to get all the old urls. So you decide that any other url that uses your old path `blog/recipes/*` should just be redirected to the new `/recipes` path. Here's how you'd handle that:
### Wildcard Path Redirects

In the example above, you've explicitly redirected one of your recipe urls, and after adding a few others, you realize that you won't have time to get all the old urls. So you decide that any other url that uses your old path `blog/recipes/*` should just be redirected to the new `/recipes` path. Here's how you'd handle that:

```js:title=gatsby-node.js
exports.createPages = async ({ graphql, actions }) => {
@@ -56,7 +56,7 @@ exports.createPages = async ({ graphql, actions }) => {

### Splat redirects

Extending our wildcard example above, you may have a high degree confidence that all of your old recipes that lived at `/blog/recipes` have been migrated to `/recipe`. In that case, you can use a `*` marker in the toPath to indicate that you want the redirect to include everything after the base url. In that case `/blog/recipes/any-awesome-url-path` would become `/recipes/any-awesome-url-path`. Here's how you'd handle that:
Extending the wildcard example above, you may have a high degree confidence that all of your old recipes that lived at `/blog/recipes` have been migrated to `/recipe`. In that case, you can use a `*` marker in the toPath to indicate that you want the redirect to include everything after the base url. In that case `/blog/recipes/any-awesome-url-path` would become `/recipes/any-awesome-url-path`. Here's how you'd handle that:

```js:title=gatsby-node.js
exports.createPages = async ({ graphql, actions }) => {
@@ -74,7 +74,6 @@ exports.createPages = async ({ graphql, actions }) => {
If your site has multi-national pages, Gatsby provides the ability of redirecting based in the country that the request is made. We use a Two-letter country code based on the regional indicator symbol standard to define the country you might want to redirect. If you would like a certain page redirected to its language equivalent you can use the conditions: `{ country: ""}` key in `createRedirect`. `country` can either be a string or an array of strings.

```js:title=gatsby-node.js
// gatsby-node.js
createRedirect({
fromPath: `/blog`,
toPath: `/italian/blog`,
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ Please be advised that this is also a custom feature of webpack.

### Additional resources

- More on [using an imported font](/docs/recipes/styling-css#adding-a-local-font).
- More on [using an imported font](/docs/how-to/styling/using-local-fonts/).

## Querying for a `File` in GraphQL using gatsby-source-filesystem

Original file line number Diff line number Diff line change
@@ -128,7 +128,6 @@ If you need the full address elsewhere in your config, you can access it via `si
## References:

- [Gatsby on AWS, the right way](https://blog.joshwalsh.me/aws-gatsby/)
- [Using CloudFront with gatsby-plugin-s3](https://github.com/jariz/gatsby-plugin-s3/blob/master/recipes/with-cloudfront.md)
- [Publishing Your Next Gatsby Site to AWS With AWS Amplify](/blog/2018-08-24-gatsby-aws-hosting/)
- [Escalade Sports: From $5000 to $5/month in Hosting With Gatsby](/blog/2018-06-14-escalade-sports-from-5000-to-5-in-hosting/)
- [Deploy your Gatsby.js Site to AWS S3](https://github.com/bennewton999/blog2018/blob/master/content/posts/11-24-2017/index.md)
6 changes: 2 additions & 4 deletions docs/docs/how-to/routing/layout-components.md
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ title: Layout Components

In this guide, you'll learn Gatsby's approach to layouts, how to create and use layout components, and how to prevent layout components from unmounting.

## Gatsby's approach to layouts
## Introduction

Gatsby does not, by default, automatically apply layouts to pages (there are, however, ways to do so which will be covered in a later section). Instead, Gatsby follows React's compositional model of importing and using components. This makes it possible to create multiple levels of layouts, e.g. a global header and footer, and then on some pages, a sidebar menu. It also makes it possible to pass data between layout and page components.

@@ -59,9 +59,7 @@ Alternatively, you can prevent your layout component from unmounting by using [g

## Other resources

- [Creating nested layout components in Gatsby](/docs/tutorial/part-3/)
- [Life after layouts in Gatsby V2](/blog/2018-06-08-life-after-layouts/)
- [Migrating from v1 to v2](/docs/reference/release-notes/migrating-from-v1-to-v2/#remove-or-refactor-layout-components)
- [gatsby-plugin-layout](/plugins/gatsby-plugin-layout/)
- [Defining a layout with MDX](/docs/how-to/routing/mdx/#defining-a-layout)
- [wrapPageElement Browser API](/docs/reference/config-files/gatsby-browser/#wrapPageElement)
- [wrapPageElement SSR API](/docs/reference/config-files/gatsby-ssr/#wrapPageElement)
2 changes: 1 addition & 1 deletion docs/docs/how-to/routing/mdx.md
Original file line number Diff line number Diff line change
@@ -319,7 +319,7 @@ For further reading, check out the [createPages](/docs/reference/config-files/ga

### Make a layout template for your posts

You can create a file called `posts.jsx` in `src/templates` - this component will be rendered as the template for all posts. Now, create a component that accepts your compiled MDX content via `children` and uses GraphQL `data` to show the title. **Please note:** The query must **not** have a name. This way Gatsby can create a unique one internally and the `__contentFilePath` in the next step will work correctly.
You can create a file called `posts.jsx` in `src/templates` - this component will be rendered as the template for all posts. Now, create a component that accepts your compiled MDX content via `children` and uses GraphQL `data` to show the title:

```jsx:title=src/templates/posts.jsx
import React from "react"
Loading