Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Netlify Next.js and Contentful minimal starter.

A full-stack Next.js TypeScript template focused on functionality over UI, featuring Zustand, TanStack Query, and ESLint 9 support.
The Next.js + Contentful Minimal Starter is a boilerplate template that pairs the Next.js framework with the Contentful headless CMS for deployment on Netlify, giving developers a working content-driven website in minutes. It is maintained by Netlify and provides a live demo at nextjs-contentful-starter.netlify.app.
The Next.js + Contentful Minimal Starter is a starter repository that connects a Next.js front end to a Contentful space via delivery and preview API tokens. It takes as input your Contentful credentials and a new space, and it produces a locally runnable Next.js site populated with example content imported through an npm script. The starter runs on Netlify for deployment and is provided by Netlify for the Next.js + Contentful combination.
npm run import loads the included content models and example content into your Contentful space, so you start with sample data rather than an empty CMS..env.example to .env and fill in CONTENTFUL_SPACE_ID, CONTENTFUL_DELIVERY_TOKEN, and CONTENTFUL_PREVIEW_TOKEN to connect your space.npm run build, the publish directory .next, and the environment variables to add in the Netlify dashboard for direct Git-based deployment.npm run build and .next publish directory to deploy from GitHub, GitLab, or Bitbucket repositories.The starter follows a linear setup: fork and clone the repository, run npm install, create a new Contentful space, generate a management token and API keys, then set the environment variables in a .env file. After that, npm run import populates the space and npm run dev starts the local development server at localhost:3000. To go live, push the repository to a Git host and import it into Netlify with the documented build settings.
You need a Netlify account, a Contentful account, a GitHub, GitLab, or Bitbucket account, and Node v18+ or later. Optionally, you can use nvm for Node version management.
Push your code to a Git repository, then in the Netlify dashboard choose Import from Git, select the repository, set the build command to npm run build, the publish directory to .next, and add the three Contentful environment variables under Settings > Environment variables.
The starter needs CONTENTFUL_SPACE_ID, CONTENTFUL_DELIVERY_TOKEN, and CONTENTFUL_PREVIEW_TOKEN. The space ID is found in Contentful under Settings > General Settings, and the tokens are generated from the API Keys section.
Yes, the starter includes a live demo at nextjs-contentful-starter.netlify.app, which shows how the imported content renders in the Next.js front end.
