Create a Remix blog powered by Contentful. Based on the contentful gatsby starter blog repo.
$ git clone git@github.com:marcolink/contentful-remix-starter-blog.git
$ npm install
Or hit the Use this template
button on the repo page.
Create contentful account or use your existing account to create a space. Now create a delivery and management token.
We now need to set up some env variables:
I personally like to use
direnv
to manage my env variables. go check it out!
# your space id
export CONTENTFUL_SPACE=<contentful-space-id>
# your content delivery API token
export CONTENTFUL_CDA_TOKEN=<contentful-delivery-token>
# your content delivery API token
export CONTENTFUL_CMA_TOKEN=<contentful-management-token>
$ npm run setup
To run your Remix app locally, make sure your project's local dependencies are installed:
$ npm install
Afterwards, start the Remix development server like so:
$ npm run dev
Update your local typescript definitions for your content types. This step is only needed If you change content types in the associated space.
$ npm run generate
Open up http://localhost:3000 and you should be ready to go!
If you're used to using the vercel dev
command provided by Vercel CLI instead, you can also use that, but it's not needed.
This project is bootstrapped with npx create-remix@latest
and can be deployed to vercel.