new website powered by quartz and nix
I’ve finally gotten around to converting my notes into a new website. There, you can find all sorts of things like my blog posts, information about games I’ve made, music albums I’ve composed, and notes I’ve written.
You can see it here: https://www.exodrifter.space
I’m still migrating a lot of stuff over, but hopefully over time all of my written content will eventually live there now. There’s also an rss feed!
This website is a bit different from the usual because it doesn’t host just a blog; it is also the successor to both my logbook and my old website. In fact, the original logbook repository is now being used to make the website with Quartz and Nix, which I’ll explain briefly below.
Quartz has what I would consider a less-than-ideal setup process. Here’s how it works in summary:
- Clone the Quartz repository
- Put your content in the
content/
folder - Configure, customize, and extend Quartz by modifying the source code accordingly
- Whenever you want to generate your site, you build the entire project
I don’t think this is a very good idea, as there’s no encapsulation between the application and the user. I won’t spend time explaining my position here though.
Because of Quartz’s setup process, I had a few specific concerns:
- I don’t want to have all of the Quartz source code in my repository
- I want to make sure my changes to Quartz continue to be modular and easy to maintain
- I don’t want to install Quartz’s build dependencies on my system
So, I turned to Nix to address these issues. Now, I’ve never used Nix before but I managed to wade through the terrible documentation on stream to arrive to what I think is a pretty good solution (and I also got some help from Gabby @fullmoon):
(you can also view this on GitHub)
This flake does essentially every step in the Quartz setup instructions, except without actually pulling the history of Quartz into your repository and by copying my own content to wherever Quartz expects it when it builds. You might notice that some of the re-export modules were moved; that’s so I can add new files that need to be re-exported, but without needing to write code that knows how to edit typescript. Instead, all I do is re-export everything the original index re-exports.
Along with some changes to add developer tools, now all I have to do to build and test my website is nix run
!