Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A Gatsby + Contentful starter that creates a content-driven static site, with a hosted demo and one-click Netlify deployment.
Cape is a Gatsby starter created by Juhi Trivedi that pairs the Gatsby static site generator with Contentful as a headless CMS, producing a content-driven website that can be deployed to Netlify. This open-source demo, available on GitHub, shows how to scaffold a new Gatsby project with npx gatsby new your-project-name https://github.com/juhitrivedi/cape.git and then connect it to your own Contentful space.
Cape is a Gatsby Content starter, meaning it is a pre-configured Gatsby site intended to be customized rather than used as-is. It takes a Contentful space ID and access token as input, reads content from Contentful at build time, and outputs a static site that runs at http://localhost:8000 during development. The starter was created by Juhi Trivedi and has an associated live demo at https://cape.netlify.com/.
The starter's features center on the Gatsby and Contentful integration, with tooling to speed up development and deployment.
spaceId and accessToken in a .contentful.json file in the project root.http://localhost:8000/___graphql so you can inspect and test queries against your data.npx gatsby new your-project-name https://github.com/juhitrivedi/cape.git, no manual setup beyond adding credentials.The starter suits developers and site owners who want a CMS-driven Gatsby site without building the integration from scratch.
Once set up, the starter supports several practical outcomes.
.contentful.json credentials and Gatsby's data layer work together in practice.The quick start guides you through three steps: create a new Gatsby site using the starter's GitHub URL, install and start the development server with gatsby develop, and then add your Contentful credentials by creating a .contentful.json file with your spaceId and accessToken. The site runs locally at port 8000, and you can deploy to Netlify using the provided button.
Cape is an open-source starter on GitHub, so the template itself is free to use. The live demo at https://cape.netlify.com/ also runs without charge, though you will need your own Contentful account and Netlify account for your own deployment.
You need a Contentful space with a space ID and an access token. The starter expects these in a .contentful.json file in the root directory. Without that file, the build will not have content to pull.
After running gatsby develop, the site is served at http://localhost:8000. A separate GraphQL playground is available at http://localhost:8000/___graphql.