All Articles

Setting up this blog with Gatsby and Netlify

You can use almost any CMS system for a blog like this one. Wordpress would be an obvious choice, and for most people not a bad one. Nice themes are available and setup is really easy. You have to provide a webspace with database and look after security updates, though - no big deal. But I wanted something static but modern, JAMstack style.

Gatsby

Enter Gatsby.js. Gatsby is a based on React and basically a PWA (Progressive Web App) generator. Content data input can come from any database or API source, but may also be just Markdown files as in the case of this site. Gatsby uses GraphQL to query the data. The code to build this site is based on the Lumen starter.

Hosting static sites is easy and secure (as they can’t be hacked by server side script vulnerabilities like PHP for example). Netlify is a popular hosting service with JAMstack people and really delightful to use. It’s very fast since under the hood global CDNs are used, but without the hassle of having to configure e.g. CloudFront distributions by yourself.