I wrote a photography website using GatsbyJS, gatsby-transformer-sharp, the Directus CMS, and gatsby-source-directus7. It was super easy in development and created a blazing fast static website. The build was working fine right up until we added a fair number of photos. Initially, it was taking about 20 minutes to process his photos in a GitLab runner, which seemed reasonable. He added more and larger photos to total about 200 photos and, after debugging dependency issues with Gatsby, the build started simply timing out after a hour.

Since the Gatsby Directus plugin downloads every single file uploaded, I could not start my development environment on my local computer since my internet connection has a high error rate and the download would always fail after an hour or so. The solution that I found was to put the development process on a fairly expensive VPS using SSH local forwarding. But it still takes around an hour on the "Generating thumbnails" step.

I was hoping Gatsby would be simple, but it is anything but simple. So far, I've run into dependency hell, impossibly large development downloads, and unreasonable build times. At this point, it would've taken me less time to re-write the site using a different SSG than it did diagnosing these issues.

The requirements are:

  1. Able to purge and minify CSS to keep the size down
  2. Able to run on a wide range of clients (with or without JS)
  3. Keeps the JS bundle bloat down (if it generates much JS at all). I really don't need a dictionary or pictures of Guy Fieri bloating my website ;)
  4. Able to scale images, convert to standard formats, and, importantly, cache them for future builds. Gatsby has a cache, but I frequently have to clear it in development because something isn't working.
  5. Relatively easy to set up and easy to maintain. I am quite comfortable programming. I have encountered issues with Gatsby dependencies not working together and the only reason I have the site working now is because I copied the versions in use by another working and appropriately licensed website. I would like to avoid dependency hell.
  6. Support for dynamic pages. These are determined by blog posts, blog categories, and gallery categories.
  7. I also like the idea of having something that can allow me to determine the URL of generated resources, like images or JS bundles, since this could allow me to use something like IPFS. This isn't a strict requirement, though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.