Computer :(

/home/rrix:blog:tags:cgit:rss

Moved to Pelican

So, after my site silently started bitrotting recently, I decided to follow qDot's lead and convert my blog to Pelican, yet another static site generator.

I wasn't a huge of JB, which seemed like there was some major points that were just clobbered on to work with Jekyll. The plugin support left me in a mess, more than once and I wasn't a fan of having to carry custom patches to get the plugins to even run in a 'safe' environment.

Moving over was fairly straight forward, since they're both Markdown based, but I still had to recode most of the logic in the templates to switch from Jekyll's Liquid markup to Pelican's Jinja2. Jinja2 is really growing on me, and it's a hell of a lot more powerful than Liquid. It probably took me about 12 hours to recode everything and maybe 3 to get my posts up to snuff; I still have a lot of retagging to do, but that's fine and manageable.

All in all, a good decision, and gives me a good platform to do some more innovative things which JB was restricting me from. If you're looking for something nice to play with, check it out; I'd post my repo but it has some unfortunate history in it that I'm too lazy to clobber, but qDot posted the slashdong repo on GitHub and looks like a good example of how to go about this. Check it, yo.

This biggest problem I had, it turns out, was figuring out how to have a static index page while also having paginated blog entries on a seperate page.

I ended up creating a template called blog which contains my paginated code, a page called index.md which I forced in to /index.html and a few settings tweaks:

DIRECT_TEMPLATES = ['blag', 'tags', 'categories', 'archives']
PAGINATED_DIRECT_TEMPLATES = ['blag']

settings.py

save_as: index.html
url:

content/pages/index.md

This created an /index.html from that page, and a blag.html, blag2.html, etc from the paginated posts. Woo!

I also took some time to rewrite my Portfolio plugin, which had been horribly broken in local development for some time. Basically what this does it takes all of your pages that have the category 'projects' and pulls together a JSON blob describing them from the metadata. I feed this in to timeline.js and bam sexiness. I plan to rip timeline.js out soon and replace it with something smaller (the JS alone is currently half the total page load size!) I'm going to post as much of this on GitHub as I can, I think, after I genericize the theme some more.