Get started with Contentful

Create a space, add sample content, and deploy a Gatsby site in minutes, all through the Contentful CLI. See how Contentful works with the latest web technologies to power content.

Learn about the site your are creating below, or get started right away in the CLI

See how Contentful works with Gatsby and the latest web technologies

The sample blog in the Contentful guide is a static site built with Gatsby.js and can be deployed to any static site hosting provider.

Gatsby starter tech stack

Explore how the sample website is built with Contentful

The content of the site is structured so that it is easy to reuse, and can work with any layout you can dream up.

Contentful data flow

Ready to start? Set-up and deploy a website through the Contentful CLI

Install the Contentful CLI tool

Install the contentful-cli by following these steps.

Run the guide and follow the steps

contentful guide
Steps that the guide will take you through:

Sign in to new or existing account

The first step opens a browser window to the Contentful sign-up page, where you can login or sign-up. Once that’s done, you’ll get your Access token required by the guide.

Create a Space to hold your content

The second step creates an empty Space for you. A space is where content and assets are managed. This step uses the Content Management API.

Note: Creation of a space may result in additional charges if the free spaces available in your plan are exhausted.

Create your Content model and first entries

The third step sets up your content model which is the structure for your content and populates your newly created space with content entries and assets. This step uses the Content Management API.

Clone the sample website repository

The fourth step clones the Starter Gatsby Blog repository from Github.

Run the website in development mode on your machine

The last step runs the app, which is now set up to pull content from your newly created space! This step uses the Content Delivery API.

Deploy the Starter Gatsby Blog

You are now done creating your own Contentful-powered website! New builds of the site will pull the most recent state of your content from Contentful. Now, it's time to deploy it! Select your preferred hosting service to see the CLI deployment commands. We have selected two hosting service providers as options to get you started.

Netlify CLI CommandsView deployment instructions for Heroku

  1. Install the Netlify CLI
  2. netlifyctl login
  3. npm run build
  4. netlifyctl deploy -b public
  5. Netlify will ask if you want to create a new website. Select "YES" to deploy the site.

Next steps

Congratulations! You've completed the Contentful guide. Keep exploring below: