Skip to content

Category: Gatsby

  • Gatsby Themes Pros and Cons
    Here is the TLDR. I think for most projects, most of the time, you should use a "starter" when beginning a new Gatsby project. In my opinion Gatsby themes are best suited for two main use cases; large enterprise size projects or a high flow design/development agency. I say this as someone who has…

  • Adding global script and stylesheets to Gatsby head
    Adding a global script or stylesheet to your <head> element in Gatsby can feel a bit tricky. You can't just copy and paste into an html template from days of yore. The final html document structure is composed by Gatsby at build time which means we need a couple of extra steps to get this done…

  • Advanced mapping with Gatsby and React Leaflet
    Hang on to your hats - this is a blustery one! In this post we walk through creating an imaginary real estate mapping app using Gatsby and React Leaflet . We are using v3.0 of react-leaflet which was released at the end of 2020 - this code won't work for v2 but I have working code for v2 of react…

  • Gatsby Theme Catalyst in 2021
    2020 - what a year. I want to begin by acknowledging that this post is about a bunch of insignificant computer code when cast against the pain and suffering that has unfolded across the globe this past year. I hope you are safe and healthy with your loved ones. The future is bright for Gatsby…

  • Load more button and infinite scroll in Gatsby
    Load more buttons and infinite scrolling are common UI patterns on websites with large amounts of content. It improves page load performance and allows users to dynamically view more content as needed. From a web development perspective this data is often refreshed via an API call and on very large…

  • Form submission using Gatsby, SANITY, Netlify and React Hook Form
    Heads up this guide was written with v6 of react-hook-form, v7 introduced some changes that will need updates from this code. Check out the migration guide for more info. Buckle up. This is a big one. We are going to walk through creating a contact form in Gatsby that submits to both an email…

  • How to setup a Gatsby themes monorepo
    I manage a Gatsby themes monorepo that currently has 11 themes and 8 starters with over 1500 commits - lots of moving parts to keep organized. At the end of this tutorial you will have a Gatsby themes monorepo setup with automated testing, automated dependency management, automated publishing…

  • Geocoding with Gatsby and SANITY.io
    Geocoding is the process of turning a regular address into latitude and longtitude coordinates that can be used in a mapping application like Google Maps or LeafletJS . I am going to walk through setting up a SANITY.io schema, querying the SANITY.io API via gatsby-node.js , passing the query…

  • How to use Theme UI variants
    I am a big fan of using Theme UI to style Gatsby projects. For me one of the standout features is the less well known - but very powerful - API called variants . Variants allow you, as a theme developer, to enable a happy path for users to customize their visual design without having to shadow…

  • 10 reasons to use Theme UI in your next Gatsby project
    Combining Theme UI with Gatsby has been a huge productivity win for me; design tokens, quick mobile styles, a robust component library and more. I am building every new project using Theme UI and here are 10 reasons I think you should consider it too. Consistent design system At the heart of…

  • Building a sub-menu with Gatsby
    You have a great Gatsby site! You followed all the tutorials and it is blazing fast. But wait, you need a sub-menu (or dropdown menu) in your navigation? It is not as easy as it sounds if you want to keep a modern component architecture and use things like the javascript .map method. This is a…

  • Examples of using options in Gatsby themes
    The ability to define options for Gatsby themes unlocks a powerful set of development opportunities. You may have already used an option like contentPath before but there is so much more you can do! Before you go any further, you need to pause and read Chris Biscardi's excellent post about…

  • Getting Started With Gatsby-Theme-Catalyst-Writer
    This theme has been depreciated, instead use gatsby-theme-catalyst-hydrogen , which is an updated version of this theme with an improved API. There is a complete tutorial for this updated theme you can follow. This Gatsby theme is for freelance writers and journalists who want a fast, easy to…

  • Understanding latent component shadowing in Gatsby themes
    As I worked on building themes for Gatsby I went through a number of different iterations trying to find an approach that would allow for easy composition and clear separation of concerns. The lightbulb went off for me when I read John Otander’s blog post on the topic of latent component shadowing…

  • How to display alternate content in dark mode using Theme UI
    Theme UI provides a great pattern for implementing dark mode on your Gatsby website. If your site is primarily text, this can be as straightforward as changing a few colors in your theme and off you go. Most websites are not so minimal and include images, icons, background patterns, etc. If you…

  • Introduction to Gatsby Theme Catalyst
    Gatsby Theme Catalyst has been launched along with a new website and docs . The content in this post is outdated and probably not worth reading anymore. Gatsby Theme Catalyst is my opinionated view of a modern tech stack relying on a combination of Gatsby , MDX , and Theme UI . I built this…

Illustrations by Diana Valeanu
© 2022 Eric Howey - eric@erichowey.dev

In the spirit of reconciliation, I acknowledge that I live, work and play on the traditional territories of the Blackfoot Confederacy (Siksika, Kainai, Piikani), the Tsuut’ina, the Îyâxe Nakoda Nations, the Métis Nation (Region 3), and all people who make their homes in the Treaty 7 region of Southern Alberta.