logoBrett Rawlins

Trying out Gatsby

May 27, 2020

Lately I've been feeling like I should start blogging again, but the site needed some love first. As they say, "The cobbler's children have no shoes". You know how it goes. As a web developer, I feel like I should have a website, but after all my other responsibilites, I never find the time or energy to work on it.

I've been hearing a lot about Gatsby, so recently I decided to check it out. I ended up converting this site to run on Gatsby as a learning exercise.

What is Gatsby?

Gatsby is a static site generator. That means there is no server on the back end. All the pages and assets are generated during a build process and then deployed to wherever you host your site. This works great for blog sites like mine that don't need to be highly dynamic or display real-time updates.

Static sites come with their own set of challenges of course, but some of the biggest benefits are speed and security. Since there are no database or API calls to fetch data, load times are fast. That also results in better security since there is no backend that could get hacked. It's just plain old HTML files and JavaScript.

Why Gatsby?

I like the idea of being able to write my posts in markdown and have the content version controlled. There are plenty of other frameworks out there (like Jekyll or Hugo) that can do that, but Gatsby uses React. Since I'm a JavaScript developer who uses React, it made sense. You can write blog posts in markdown, but also have the full power of React available when you want it.

Initial Thoughts

So far I've been pretty impressed with Gatsby. It seems to have a lot of flexibility and power. There's a large community around it with lots of plugins available.

Sometimes the documentation seems a little lacking, but again, because of the community, there are lots of articles and tutorials out there, so you can usually find what you need.

It seems like almost everything you want to do requires a plugin, which is fine, but often the plugins feel like "magic". They just do stuff behind the scenes and you don't really have a lot of visibility into what's happening, which is not my favorite.

I still have a lot to learn about Gatsby, and there are plenty of things to figure out. As I find solutions, hopefully I'll have time to circle back and write about them here. One can always hope.

Tags:#gatsby