Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A starter template to build amazing static websites with Gatsby, Contentful and Netlify.
gatsby-starter-gcn is a Gatsby starter (boilerplate) that scaffolds a static blog website wired to Contentful as a headless CMS and Netlify for hosting, forms, and continuous deployment.
gatsby-starter-gcn is an open-source starter template created by Ryan Wiemer (GitHub user ryanwiemer) for building static websites with Gatsby, Contentful, and Netlify. It takes a new Contentful space as input — populated via a built-in setup script — and produces a static React site with blog posts, tag pages, a contact form, and an SEO-friendly structure. The starter is designed to be customized or taken apart, with configuration split between src/gatsby-config.js for site data and src/gatsby-plugin-theme-ui/index.js for design tokens. A live demo is available at https://gcn.netlify.app/.
The starter includes the following concrete features out of the box:
yarn run setup script that imports posts and pages into your Contentful space using your Space ID, Content Delivery API key, and management key.ACCESS_TOKEN, SPACE_ID, GOOGLE_ANALYTICS) for Git-based deploys.src/gatsby-plugin-theme-ui/index.js) that defines colors, fonts, max widths, and responsive breakpoints (small, medium, large).postsPerFirstPage defaults to 7 and postsPerPage defaults to 6, with a basePath option to root posts and tags under a subpath like /blog.eslint-config-gatsby-standard) for JavaScript linting via yarn test, plus Stylelint support for linting styled-components CSS-in-JS.This starter is aimed at anyone building a content-driven static site who wants the Gatsby + Contentful + Netlify trio already wired together.
With this template you can ship a production-ready static site in a day.
Setting up the starter involves a few concrete steps that connect Contentful and Netlify.
gatsby new gatsby-starter-gcn https://github.com/ryanwiemer/gatsby-starter-gcn.git.yarn run setup to populate it with placeholder content.src/gatsby-config.js with your site title, description, URL, menu links, and pagination settings.ACCESS_TOKEN, SPACE_ID, and optionally GOOGLE_ANALYTICS.Here are answers to common questions about configuring the starter.
Edit the siteMetadata object in src/gatsby-config.js. It includes fields for title, description, siteUrl, image, and menuLinks (an array of name/slug pairs). After editing, run yarn clean and restart the development server if changes don't appear immediately.
Meta descriptions are entered per post/page inside Contentful. If the field is left blank, the starter automatically uses the first 320 characters of the post or page as the excerpt.
Add three environment variables in Netlify under Settings → Build & Deploy: ACCESS_TOKEN, SPACE_ID, and optionally GOOGLE_ANALYTICS. They must be named exactly as shown. Netlify will then build the site on every push to the master branch.
The starter includes a pre-built contact form component that submits to Netlify Forms. You can manage submissions in the Netlify dashboard and set up notifications via the Forms → Notifications tab (e.g., email or Slack).
No — the README explicitly warns not to store Contentful access tokens or space IDs in the repository. They should be provided as environment variables in your deployment platform.
