10,000 gatsby develops later
Update: Iβve changed the stack again. I know. What can I say, Iβm an engineer. Details here.
A month ago, I had an idea that I wanted to change my siteβs stack.
- ππΌ remove Ghost as the provider of content, change to publishing via commiting to the git repo.
- π move the content in to an Obdidian vault.
- π have Gatsby generate a static site from the markdown files in the vault.
- ππ»ββοΈ support double-square bracket wiki-style links in the content, and support backlinks.
- π use Tailwind CSS for styling.
When I first set this site up a year ago, I really wanted to focus my time on writing, not learning a technology. So I slightly moderated a starter project and launched with that. This time around, I thought I could go ahead and build something myself and learn how to use Gatsby in the process. I thought it would take maybe a week or two of my writing time of 20-30 minutes per day. It ended up taking a month, with half of that consisting of my banging my head against the desk.
One of the great things about using tech like Gatsby is the huge ecosystem of resources and open source code around it. I found the following docs and posts very helpful in putting the site together.
- Install Tailwind CSS with Gatsby
- Adding Markdown Pages
- Adding Tags and Categories to Blog Posts
- Migrating Remark to MDX
- Working with Images in Gatsby
- Creating a DIY Digital Garden with Obsidian and Gatsby
Doing all the React & GraphQL for the site was very quick and straight forward. Where I got owned was incompatibilities between plugin versions and trying to figure out the right combo to get things doing what they are supposed to. I probably did not help myself here by upgrading to Gatsby 4 after it was released about a week in to developing this thing.
I abhor config-style development. That is the kind of dev where you modify something in a config file, run a process and wait for it to complete, only to discover it is still broken. You repeat this until you get the config just right, or you have a mental breakdown, whatever comes first. Unfortunately, working with Gatsby (or any static site generator software, probably) falls under this category.
After spending so long tweaking JavaScript just to generate some HTML pages, I wondered if it would have been quicker just to hand code the site. And maybe it would have been. But now Iβve completed the setup, it will be very quick and easy to publish new notes going forward. Which is the whole point of using something like Gatsby of course.
How wild is it that I can be given all of this code for free, with tonnes of documentation, and I can still turn around and moan about the Developer Experience of it? We are so spoiled with open source culture. I wonder if there is any other profession that gives away so much for free and its members can feel so entitled as a result?
Comments
Jonathan Cousins
November 23, 2021 at 12:07 AM
I've been using 11ty as my static site generator. Maybe it has the answers to the gatsby woes?
https://11ty.rocks/
Leave a Comment
π― Thanks for submitting your comment! It will appear here after it has been approved.