I recently read [Josh Comeau's excellent article](https://www.joshwcomeau.com/react/dark-mode/) on how he was able to achieve a theme toggle on his Gatsby site. I find his solution to be excellent! However my Gatsby site is, for better or worse, pretty tied to MDX and React. I implemented a solution based on his for my current site theme. Read more