I've been meaning to shift my personal site to a static site for quite a while. I fully intended to use something like hugo or even Pelican which I formerly used to manage the mempy.org website. Earlier this year, I archived my django-blargg repo, and so with a little extra time around the holidays I decided to finally make this happen.
I really wanted to use Hugo. I've used it before, it's got a great feature-set and tons of support. BUT! I had a few requirements for my new site:
- Cool URIs don't change. I really really though I could do this with hugo, and I 100% beleive it's possible, but I just pounded my head against this forever. Eventually I ditched hugo because of this requirement (and the fact that I had some markdown + some rst + some html content).
- I really want to just use markdown. Most of my content was already there, and with a little extra throw-away code I mostly converted everythign to markdown.
- I really don't want to think too hard. I write so infrequently hugo's giant feature-set was just a bit much.
I know python. I know jinja. I know how I want to organize my content.
Well crap. I've reinvented a static site generator. Right now, the feature set is pretty small (just want I wanted). Features include:
- Two commands for managing content:
python site.py newto generate a template for new articles
python site.py buildto build the site.
- support for CommonMark thanks to markdown-it-py
- Easy (for me) template customization thanks to jinja
- A very simple UI -- because I didn't want to think about this righ now, but it'll probably change. Thanks kevquirk/simple.css
If you're interested, take a look at the single python module here: https://github.com/bradmontgomery/bradmontgomery.github.io/blob/main/site.py.
This isn't really indented to be shipped, but if there's interest I could turn it into a library. I probably should. Maybe. We'll see.