Python Static Site Generators

So, I have this personal project I’m working on that involves having a static site with information about products, combined with a storefront. I don’t need the majority of the dynamic features of something like WordPress, so I wanted to avoid the server side costs associated with a full content management system.

These days the way you do that is to use a static site generator. You write content on your own machine, run the generator, and it spits out the HTML files that make up your site. You then upload those files to your web server. When the site needs to change, you repeat the process.

The advantage of a static site is that if you get a lot of visitors the web server doesn’t need to run any server side code, so it’s fast. There’s no database involved, so no worries about the number of connections being made, etc.

The downside is that you have a harder time integrating truly dynamic content. That isn’t an issue for my use case, for various reasons I’ll go into in later posts.

I hunted around for a good static site generator. I wanted one that’s Python based, because I love using Python for these side projects. And I needed one that was versatile enough to power a regular site (not a blog) that had needs specific for my project.

I found plenty of Python static site generators, but most were oriented around creating a blog. Some were extensible, but not easily so without wading through a ton of code to work out how to do it. I finally ran across Urubu, and it fit my needs pretty well.

Urubu is designed around sites, not blogs, and is extensible with a couple of simple Python hooks. I’m pretty sure I’ll be able to code what I need to generate the sort of site I want to generate without too much trouble.

As a bonus it integrates well with both Bootstrap and a cool Javascript searching library. If you’re looking for something similar, check it out.

Note that if you install Urubu and it crashes when you try to build a site, it’s probably because the Markdown library updated to 3.0 and Urubu hasn’t quite caught up yet. You’ll need to install the 2.6 version of the Markdown library until Urubu supports 3.0.

This entry was posted in Programming, Python. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *