I wasn't really using the Gatsby framework properly. I read the Gatsby docs more carefully and re-wrote everything in approximately The Gatsby Way. It's much less code and much more config and definitely better. I deleted about half the code in fact, and left behind is about 120 lines of very readable javascript and 100ish lines of css.