how this site works

I really didn't want to have to think too hard about how my site worked. I'm not huge on graphic design or anything like that. So I wanted my site to be as bare bones as possible. I also didn't want to write html. I looked a couple of static site generators but they all seem too complicated to learn just to spew some thoughts down on a page. So I decided to whip up a quick little scripting ssolution.

Simply put this is just a gemini capsule hooked up to a html translator and a really dead simple CSS template, glued together with some shell scripts. I'm not a super unix-fu guy so it took a lot longer than it reasonably had any right to. But now I understand sed a little better. One thing I wanted was for it to be fully automatic. I wanted to be able to write anything I needed on my laptop (or another computer I guess), push it to the server with scp, and the site should rebuild automatically any updates. I originally was messing with make for this but I recently came across haredo, which is better in so many ways. It ends up being a lot simpler to handle. Now to actually trigger on file changes I set up an inotifyd script to just run haredo any time a file was written in my server root or any of its directories. Combine that with a trigger that deletes files fromthe http server if they're deleted from the gemini server and we're good to go. inotifyd has a couple of limitations, mainly that it doesn't recurse directories, so I have to specify manually the folders I want to watch. Right now I just enumerate the directories with find, but this obviously won't update for new ones so if I end up fiddling with the site structure I'll have to restart the daemon (not a huge deal). Overall I'm pretty happy with it!

home