Hello Zola

2021-01-13

I'm having a go at using Zola as a Static Site Generator. Depending on how this goes, I may use this for a personal blog and/or for some other sites that I maintain. Since this is a fresh project, it saves me from procrastinating about transferring content from an existing site (although I have a lot of notes I'd like to migrate).

I first started by browsing themes and installing 'oceanic-zen' as a starting point. That failed to build because it Failed to render section '/Users/peter/Documents/code/www/zola_test/content/_index.md'... indeed, I'd added a theme before so much as starting to populate any content. As of this writing, I have another theme 'sam', and a tiny amount of content for it to chew on, but as yet I don't see much rendered to my page.

I should probably start at the beginning of the documentation, not necessarily with a theme, and make this into something more useful. Indeed, given that part of this excercise is to practice and showcase webdesign, and that I would prefer to have something that I've built more purposefully rather than assuming that someone else's 'theme' will be an appropriate starting point (although I'm still following the tutorial & carting in 'bulma' css etc).

What follows is a bit of a stream-of-consciousness while I go back and forth between setting up the bones of an experimental Zola installation, and writing about my reasons for doing so.

Why would I use Zola anyway?

I've been thinking about learning Rust, although really in a sense that has fairly little direct bearing on this, as using this software doesn't really probably entail writing any Rust code unless I become sufficiently invested in it that I start digging very much deeper.

I have recently been learning React, and getting on reasonably well with it, although the things I've been building with it haven't so far been in the form of public websites, but mostly an Electron app. Prior to that I had been mostly working in the web-ecosystem, but in an odd academic enclave with some cool but also somewhat... well... I don't know how to put it politely... let's just say I want to start something fresh. My actualy websites have all been rather neglected recently.

I used to use WordPress for my own site and a few others I'd built for other people. Given that mostly these didn't really have very frequent updates, it was a bit annoying that there was a need to actively maintain WordPress installations just to keep the things going. I was keen for a long time on making sure that WordPress was set up to run efficiently with caching to S3, but I found that when I needed to update there were often a lot of really tedious configuration issues such that I couldn't really be bothered with the effort it seemed to take just to maintain what were essentially static sites. The shared hosting I was using was an unncessary expense, I had some irritating incidences of being hacked etc.

I migrated my sites to running locally in MAMP, with the simply-static WordPress plugin as a static-site-generator and without the security issues of public-facing WordPress installations. That worked ok for a while, but I found that even maintaining MAMP was a bit of a nuisance: it seems to do things like discard old databases and apache configuration when the application updates. I can't remember in detail; I reached a point where for some reason I after upgrading to Catalina I was seriously struggling to get it running again, and realised that I was wasting valuable hours of my life to a technology that I didn't want to use anyway.

At the same time, I'd been working a bit on other things in JS/TS with a bit of Node/Electron, learning some React... but actually none of this being in the form of my own websites. The software I have been working has often been relatively high-performance, molecular biology simulation among other things. Most of the heavy lifting is done on the GPU, but it's always there in the background that working closer to native code would make sense for much of what I want to do (WebGL is also not optimal, but that's a story for another day). I've also been doing some work as a teaching assistant, working almost exclusively in C++, and making a few small personal projects with that in the process.

I've been procrastinating about how to set up my local development workflow. I've long been sold on Static-Site-Generation. I recently got a Raspberry Pi, which I'd previously earmarked as a possibility to use as a local development server (accessible from any machine in the house rather than just being on my laptop, and maintained more like a regular Linux server rather than a MAMP-like application). Indeed, I have set it up with NGinx / WordPress, scraped my. If I were to stick with maintaining my old WordPress as a CMS for static sites, I could continue to use simply-static from this installation. This is probably good in the short-term for things where I just want to update a bit of content. The design will be unaffected, which has its pros and cons (I do really want to refresh things, but at least it's good to be able to maintain and update them without it being a strict necessity).

I made a very shallow start with Gatsby, which seems like it should be a logical way to go for things that are currently in WordPress. I could write in React, which I've been getting fairly used to, and is probably useful in the current job market. It would mean using GraphQL, which I've been wanting to learn as there are a couple of APIs for things I'm working on that I suspect would benefit from it. However, my initial experience with setting up starter projects has given me some pause for thought.

JS vs Native for Web-Tooling