Lovely Systems Lovely Systems Blog entries The making-of this web site

The making-of this web site

This page, including this blog is created by Cactus, a generator for static websites.

At Lovely Systems we decided to manage our company website by using one static website generator because the site is very trivial and does not have any dynamic content. So, there are a lot of different generators with different focus written in various programming languages. We decided to give Cactus a chance because:

  • It uses Django templates. We know Django templates from earlier projects and Django templates are quite similar to Jinja templates
  • It is written in python which is our favourite programming language (you get in touch with python when writing custom plugins for Cactus)
  • Our next-door neighbour company is using Cactus as well and they made pretty good experience with Cactus

As written in the Cactus project README the definition of Cactus is as follows:

Cactus is a simple but powerful static website generator using Python and the Django template system.

This is actually a very short description of what Cactus is and what it does but it matches pretty good the feature set we are using.

Note: This post is not about how to use Cactus in general. There exists better
and more extensive documentation how to do this. For example see the docs of
Cactus itself.

Although there is one UI driven tool called Cactus for mac we decided to set up a buildout project and included Cactus just as a dependency to the project. This way we can manage our site in a way we used to work with customer projects.

Managing the site is really fun. The included development web-server can preview the site and update it whenever one project file changes. This way you can edit pages or write blog posts in the editor of your choice and preview it ad hoc in multiple browsers.

Cactus provides a flexible plugin mechanism to extend the generation process of a website. For example this blog is crated by the already included blog plugin. This plugin treats each file within a defined folder as a blog post. A blog post consists of a set of header information like author, date and so on and a body which is written in markdown.

Since the resulting website is just static content there are no requirements to the hosting systems like php or a database. Therefore, Cactus pages are predestined to be hosted on S3 or github pages. Support for S3 is already included in Cactus so the deployment to production or staging is just one keystroke.

Written by Bernd Rössl

Posted on May 17, 2015

Lovely Systems