Skip to content

Fedeorlandau/contentful-nextjs-tailwind

Repository files navigation

Contentful + Next.js + Tailwind CSS

Example project using Next.js with the Contentful Delivery API, deployed to Vercel.

web

Live Example: https://contentful-nextjs-tailwind.vercel.app/

Live Example: https://contentful-nextjs-tailwind.vercel.app/test

Developing

Env variables

Remember to set up a .env file with your contentful keys.

CONTENTFUL_SPACE_ID=''
CONTENTFUL_TOKEN=''
CONTENTFUL_ENVIRONMENT=''
NEXT_USE_SSR=1

If you want to enable SSG please set NEXT_USE_SSR=0

Once you've created a project and installed dependencies with `yarn`, start a development server:

yarn dev

# or start the server and open the app in a new browser tab
yarn dev -- --open

Building

yarn build

Content types

This starter kit relies on the following content models.

Page

Page content model

  • Title, short text.
  • Slug, short text
  • Components, References - many.

Hero

Hero content model

  • Title, short text.
  • Description, short text
  • ctaText Text, short text
  • ctaLink, short text

Lighthouse score

Lighthouse score

Releases

No releases published

Packages

No packages published