Not too long ago I switched from a Django based blog I wrote myself, to WordPress. I switched because I did not have the time to keep adding features and keep it up-to-date. I chose WordPress because I had used it before and it is quite fast and easy to setup and get going. Via the large selection of plugins it is easy to add just about any functionality to the blog. However, all this goodness comes at a price. Wordpress is one of, if not, the most used blogging platforms. WordPress being a large program makes the potential for security flaws big. WordPress being written in PHP multiplies the risk of security flaws by a 100. I spend hours tighten security on the blog. It is not so much WordPress itself I am worried about. It is the 15 plugins I have installed to make my relative simple blog work. Every time I logged in to WordPress I had to install new updates for one or more plugins. The WordPress comment system in under a constant spam attack. I received over 800 comments a day on the blog and 99.9 % of them was spam. Another thing that bothered me is the WordPress is slow. Even when using cashing the performance of WordPress is terrible. All in all using WordPress was an awful experience. So, I started looking around for another solution.

Looking at different ways of running a blog I came across the concept of a static blog. I was somewhat intrigued by this approach and came across Pelican. Pelican is a static site generator written in my favorite language Python. Information like site name, site address, theme, template, etc. is set in a config file. Blog post and pages is written in markdown, restructured text, or latex. Publishing a site can be done manually. However, Pelican has made this very easy by providing a make file to publish the site via Githup pages, ftp, ssh, and many more. For me adding a new post is as easy as creating a file in the contents folder write the post and then publish the site with the following command from within the Pelican blog folder.

make ftp_upload

Pelican will then create the static site and publish / copy / git push it to the defined location depending on your publishing method. I use a web server on UnoEuro for now so I publish via ftp.

The advantage of this approach is that the site is just html, css, and some java script for the Google Analytics and the comment system Disqus. There is no dynamic content creation to slow down the site. The site does not change until I change the html on the web server. This makes for a very fast and secure site. The workflow of using markdown for writing posts suits me quite well as I do most of my writing in markdown anyway. Another benefit is that I am able to put the blog in git. I will return with a status when I have used this for some time.

W3Schools   W3Schools   W3Schools   W3Schools


comments powered by Disqus