How to Deploy Gatsby Static Sites in China (A Step-by-Step Guide)
How to Deploy Gatsby Static Sites in China (A Step-by-Step Guide)

TLDR; This GatsbyJS China article provides you with a simple solution to deploy and host your GatsbyJS websites compliantly in China.


What is Gatsby

Gatsby or GatsbyJS is a modern website generator (SSG) based on React.js, the popular framework from Facebook. It can be used to build blogs, e-commerce websites, web applications, and etc. Pairing GatsbyJS with a headless CMS such as Contentful or Sanity.io enables marketing and technical teams to transform the overall digital experience.

21YunBox is GatsbyJS’s recommended deployment solution for China. You can deploy your Gatsby project to China with 21YunBox in the form of static web pages.


How to Deploy GatsbyJS in China?

  1. Signup on 21YunBox
  2. Fork Gatsby Example
  3. Use the following method to configure
Runtime Static Site
Build command yarn && yarn build
Publish directory ./public

If the description of the above text is not clear, please refer to the following step-by-step video tutorial:

How to Deploy GatsbyJS to a Server in China



Ready to make your app work in China?

Get Started Questions? Talk to an expert.

Ready to try 21YunBox?

Get Started