A Gatsby blog powered by Contentful.
Static sites are scalable, secure and have very little required maintenance. They come with a drawback though. Not everybody feels good editing files, building a project and uploading it somewhere. This is where Contentful comes into play.
With Contentful and Gatsby you can connect your favorite static site generator with an API that provides an easy to use interface for people writing content and automate the publishing using services like Travis CI or Netlify.
See our official Contentful getting started guide.
$ git clone https://github.com/ppigm/blog.ppigm.org.git
$ npm install
This project comes with a Contentful setup command npm run setup
This command will ask you for a spaceID
, and access tokens for the Contentful Management and Delivery API.
Run the project locally with live reload in development mode.
Run a production build into ./public
. The result is ready to be put on any static hosting you prefer.
Spin up a production-ready server with your blog. Don't forget to build your page beforehand.
See the official Contentful getting started guide.
A blog on your local machine is nice to have, but a blog on the internet is even better. Return to the tutorial doc, select a hosting service (Gatsby Cloud, Netlify, or Heroku) and follow the instructions to deploy.
Return to the tutorial doc to view the relationship between the blog content and the data model.
Follow this tutorial to learn how to use webhooks to automate the process of redeploying your site after publishing new content.
Feel free to open pull requests to fix bugs. If you want to add features, please have a look at the original version. It is always open to contributions and pull requests.
You can learn more about how Contentful userland is organized by visiting our about repository.