Gatsby

Generate static sites with Cloud CMS

[object Object]

Building a static site with Cloud CMS content is simple with Gatsby JS.
Below you will find tools and examples for how to get started.

Connecting to Cloud CMS with Gatsby

You can connect directly to the Cloud CMS API or indirectly via our app server.
We offer GraphQL endpoints on each of these that can be accessed using our
gatsby-source-cloudcms plugin.

In your gatsby-config.js file, add the following configurations:

const gitanaJson = require('./gitana.json');

module.exports =
{
    plugins: [
        {
            resolve: `gatsby-source-cloudcms`,
            options: {
                keys: gitanaJson,
                repositoryId: `repositoryId`,
                branchId: `branchId`
            }
        }
    ]
}

null
null

Source Code and Setup

The code for this example is available as part of the Gitana SDK, which contains
usages of Cloud CMS with many different languages and frameworks.

  1. To download, run git clone https://github.com/gitana/sdk.git
  2. Navigate to the gatsbyjs/sample directory
  3. Follow the instructions in README.md