What is Contentful?

Contentful is a headless Content Management System. Headless CMS provides a way to create content, but instead of coupling the content to a specific output (such as rendering a web page, such as writing on a WordPress site and Posting to a web site), it provides the content creator to write the content as before, and the developer to get the content through an API. These enable cross-channel delivery of content.

Is Contentful available in China?

Contentful team gives the answer

The Contentful team doesn’t have a “solution” yet.

In addition, Contentful has no CDN nodes in Mainland China, and China’s content control laws make it impossible to use Contentful properly and smoothly in China.

An open source alternative to Contentful: Strapi

What is Strapi?

Strapi is an open source, headless content management system based on Javascript. Content creators can create content in a visual interface, and developers can retrieve content through apis for cross-channel delivery.

21 Cloud Box offers one-click hosting, operation-free Strapi Server as a domestic alternative to Contentful.

How to create a Strapi Server?

  1. Register as a member of 21 Cloud Box
  2. Create a PostgreSQL database
  3. Fork Strapi Server startup template
  4. Create a cloud service on cloud box 21 and give cloud Box 21 access to your code base
  5. Create with the following configuration
The environment The Node 12.19
Build commands yarn && yarn build
Start the command yarn start

In terms of configuration, the Strapi official document recommends using a server with at least 2GB memory and 1 core CPU. If you choose a server with less memory, the deployment may fail.

Click advanced configuration to configure environment variables

Environment variable Key Environment variable Value
NODE_ENV development
DATABASE_URL Point in the cloud database consoleDatabase URLTo obtain
JWT_SECRET Random generation of 32-bit characters
ADMIN_JWT_SECRET Random generation of 32-bit characters

For configuration of other environment variables, refer to the Strapi documentation

To generate random 32-bit characters, paste the following command on the command line:

echo $(base64 /dev/urandom | head -c32)
Copy the code

After Strapi Server is successfully deployed, you can visit the service name.21yunbox.com. When the deployment is successful, you should see the following.

Other related blogs:

  • How to create Strapi Collection Types?
  • How is Strapi configured for medium to large projects?
  • How is Strapi configured for small projects?

From 21 cloud box official blog: www.21yunbox.com/blog/soluti…