Gatsby Build Times On Netlify Solved?

I wrote about my Gatsby build time woes yesterday. Unfortunately, Netlify and Gatsby rebuild my site completely with every update. I use the gatsby-plugin-netlify-cache but build times are still high. While searching for ways to optimize my Netlify build I stumbled upon an issue on the Gatsby repository. The issue was merged into master and published to gatsby@2.17.0. Before: At the moment this hash changes if anything within ./src has changed between builds.
Read more →

Gatsby Builds Take A Long Time

When I started the blog, I wanted a quick solution that simply works. That’s why I’m using a Gatsby Starter. I didn’t want to fiddle around with my blog too much. I chose Gatsby because it’s build with JavaScript and React.js. There are other candidates like Hugo, but I’m not familiar with the programming language it’s built with (Golang). Gatsby offers great features out of the box, and it was easy to deploy to Netlify.
Read more →

Gatsby.js: Heap Out Of Memory JavaScript Crash

Lately, my development server in Gatsby.js repeatedly crashed: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory I found a similar issue on GitHub. Suggested fixes: updating Gatsby and especially updating netlify-cms-app. My problem: All my dependencies were up to date, and I didn’t have netlify-cms-app, gatsy-plugin-netlify-cms, or similar installed. Solution (GitHub): add NODE_OPTIONS = "–max_old_space_size=4096 to node.js. You can set a universal variable in Fish shell:
Read more →

Learn About Gatsby Themes

Yesterday I finished Introduction to Gatsby, a beginners course by Jason Lengstorf, hosted by Frontend Masters. Gatsby is a static site generator for JavaScript/React.js. It pre-builds your website and serves static images. Thus, it’s very fast. But it can also load dynamic data because it also is a fully fledged React app. The Gatsby team just released a big feature: Gatsby Themes. Gatsby Themes are similar to Wordpress plugins. They are pre-configured and you can load them into your Gatsby configuration.
Read more →

error gatsby-mdx: renderMdxBody was unavailable when rendering html.

I like Gatsby.js - it offers a ton of functionality out of the box and embraces the React ecosystem. I watched the excellent Frontend Masters course Introduction to Gatsby. I’m blown away by the possibilities Gatsby offers. But the devil is in the details. A while ago, I added an RSS feed to my blog. Unfortunately, using the official gatsby-plugin-feed is not as easy as it sounds. The culprit is mdx again.
Read more →

Add RSS Feed to Gatsby

Today I added a RSS feed to this blog. I’m not happy with it. This blog runs on Gatsby and uses mdx instead of Markdown. Adding a new plugin, the gatsby-plugin-feed, was easy. But it doesn’t work with mdx. Although the RSS feed gets rendered, I can’t add a title or description to the feed. It looks like it’s a bug. Here’s how the config looks: plugins: [ { resolve: gatsby-plugin-feed, options: { query: { site { siteMetadata { siteTitle siteDescription siteUrl site_url: siteUrl } } }, feeds: [ { serialize: ({ query: { site, allMdx } }) => allMdx.
Read more →