Skip to content

Why Gatsby

Jonathan Atkins edited this page Sep 9, 2021 · 4 revisions

Gatsby

What is Gatsby

Gatsby can be used to build static sites that are Progressive Web Apps, follow the latest web standards, and are optimized to be highly performant. It makes use of the latest and popular technologies including ReactJS, Webpack, GraphQL, modern ES6+ JavaScript and CSS.

Why Gatsby

Why was Gatsby chosen over other ways of deploying React such as Next.js or Create React App? That is a good question, the answer to that being the large number of ever-growing plugins, starters, and transformers by the Gatsby community.

Some of the important ones include:

  • gatsby-source-filesystem
    • https://www.gatsbyjs.com/plugins/gatsby-source-filesystem
    • A Gatsby source plugin for sourcing data into your Gatsby application from your local filesystem.
    • This one was used to create Gallery.js; it can source all the images from a directory rather than import all the images one by one
  • gatsby-source-contentful
    • https://www.gatsbyjs.com/plugins/gatsby-source-contentful/?=conten
    • Source plugin for pulling content types, entries, and assets into Gatsby from Contentful spaces. It creates links between entry types and asset so they can be queried in Gatsby using GraphQL.
    • From this, Contentful acts as a headless content management system for the project. By decoupling the data from the project, it allows other people to make easy edits to content without having to interact with the code or even understand it.
Clone this wiki locally