GatsbyJS — Building Stallion Websites That Outrun the Rest

Daniel Bergmann
2 min readDec 5, 2020

--

Working with GatsbyJS, the React-based, GraphQL powered static site generator has been a wild ride so far. Build on top of that a modern CMS like Prismic and you can’t go wrong.

You could implement this technology into almost any industry and it would work. Even better than using dinosaur CMSs like *cough* WordPress. *cough*

But people don’t like change so how do you persuade the client or stakeholder that newer is better?

Is going static the future? Do we need the future, yet?

Bringing such a product to your boss and shouting like a monkey “hey, use this! This is the future!”.

That might not be the best way to do it but maybe there’s a better solution.

Whats Gatsby?

GatsbyJS is a combination of the ReactJS best of the best. It’s an open-source community empowered beast with a bunch of good reviews on the internet.

The developer experience is great as it weaves together the best parts of React, Webpack, react-router, and GraphQL. It has a bunch of plugins and is constantly evolving so both the developer and the client can live happily ever after.

GatsbyJS is said to be a static site generator, however, as I dive deeper into the abyss of the Gatsby development community I find out it is a much grander and generous compadre to find.

It is not like the old static generators people are used to.

It’s really a Stallion-site generator.

It uses powerful reconfiguration to build a website that uses only static files for incredibly fast page loads, service workers, code splitting, server-side-rendering, intelligent image loading, asset optimization, and data prefetching. I was told Usain Bolt couldn’t outrun Gatsby, but that's a topic for some weird podcast.

You code up your site in your favorite code editor and run gatsby build in the command line. Gatsby then transforms your code into a lean, mean code-spilling stallion of a directory in the shape of a single HTML file and your static assets.

GraphQL

GraphQL is what gives GatsbyJS the powers to make stallion websites that it does.

GatsbyJS utilizes GraphQL to build the data layer. Data from APIs, the Headless CMS you use, or JSON. When you run gatsby build it creates an internal GraphQL server from all of the data.

All in all, working with static sites is cheaper and easier for both the developer and more importantly the client. It’s modern and worth digging into if you dig digging dig worthy diggables.

--

--

Daniel Bergmann
Daniel Bergmann

Written by Daniel Bergmann

0 Followers

Daniel Bergmann is a developer located in Reykjavik, Iceland.

No responses yet