Tagged with pelican

Trying out Sigal

Even before I stumbled onto the jewels that are Pelican and other static site generators, I had longed to replace my gallery albums.

Gallery was one of the first good open source image gallery systems out there. It did an okay job, but like WordPress, it was written in PHP and massively overengineered and overfeatured.

I once spent months setting up Gallery for a client. Apart from building and installing the software (pretty easy with FreeBSD's ports) and actually getting the images together, most of the time spent was trying to integrate the gallery output pages into the look and feel of the client's existing website. That was massively painful, but in the end, it worked beautifully.

Some time later, some devs overhauled the website, and my work was put on the shelf. A bit after that, the powers that be decided the new website was aesthetically challenged (a euphemism for ugly), and wanted me to revert back to my old site. Which I did. Except that Gallery broke. I'm not sure how. The database and files were restored to their exact states (we had been meticulous about backups), but we could never get it to look the same again. I talked to some gallery devs, and everyone just recommended I upgrade from gallery 2 to gallery 3.

In the end, the gallery images were only a small subsection of their website, so we ended up not restoring it, deciding it was not worth the trouble.

Since then, I've longed for something that would just spit out raw HTML and CSS, just like pelican.

It looks like Sigal is it.

It's not perfect, by default it wants to spit out new-agey Javascript galleries, blech. But it works with Jinja2, so it should be pretty easy to make it do what I want.

Stay tuned!

Tagged , ,

Pelican, Good for websites too

I recently decided to publicly mention a small project I've been hacking away on.

It was more or less in the I'm just hacking on some code state for a while. And then in the past year, I cleaned it up a bit, added an interface, and made it (barely) functional -- if a bit feature-incomplete.

So I wanted to show it to other people, and what better way to do that than at a lightning talk at a conference?

But I wanted to have more than a GitHub page to point to, and I really didn't want to spend the time to author up a fancy website (although I can understand some HTML/CSS, I'm not a web designer by any means), so I decided to give Pelican a shot at this job.

Pelican, although mostly designed for blogs, also does a decent job at static web pages.

I got it up and running in about an hour or so. I spent most of that time finding a good theme which I liked.

I'm very happy with the results: recalc.org.

So my overall consensus is that if you need a fairly simple website, and like the [edit with text editor] and then [run make to see your output] way Pelican works, it's the tool for you.

Tagged , ,

moved to pelican

Finally done!

This blog is now statically generated by Pelican!

It was incredibly easy to move over. The WordPress XML import more or less worked without a hitch, and I'm very satisfied with the end result.

I will craft my own theme one of these days, but until then, one of the precooked ones is fine.

Tagged ,

moving to pelican

In the 3 years or so that this blog has been up, I've always been uneasy about it. A couple of reasons for this:

Firstly, Wordpress, the underlying platform, consists of a bunch of PHP scripts wrapped around a MySQL database. By far the most frequent security issues I've seen come sites running PHP. Drupal, Joomla, et al. are all easily hackable and WordPress is no exception. I update WordPress religiously on my system and I'm still afraid that someone is going to use some zero-day PHP exploit to hack me.

Less dangerously, but more annoyingly, editing articles for the blog requires that I log into my site local instance of WordPress and use the app to edit the article. This is not terribly hard, but just hard enough that I don't like doing it. Why can't I just fire up vi (startup time = ~300ms) and start writing? Hence in 3 years, I've written maybe 10 articles total. In fact, I've just played with Pelican for a bit and it was incredibly easy to add and edit articles. I'm now writing this post in WordPress and by comparison it is slow as molasses, and inelegant to type this into a web window.

I started looking at static site generators a while back. The first was Blosxom, which came out 12 years ago apparently. I first investigated it in 2004. It had promise back then, but was still rough around the edges.

I have since discovered Pelican, thanks to dotCommie. It's written in Python, uses Markdown/reStructured Text as input, and with the magic of templates (it uses Jinja), generates totally static content. Which is all I need. I've been playing around with it and like what I see so far. I will switch the entire site over when I find some free time.

Tagged ,