Migrating my Blog to Pelican

Posted on Mon 28 August 2017 in Blogging

If you visited my Blog in the past, you may have noticed the design changes. It is not only the design that changed. I replaced the system for generating the Webpage.

Since I am a lacy guy I used Wordpress up to now. It was a better solution than the software I used before. Wordpress usability is O.K but it is based on PHP and suffers from exploits from time to time. The Wordpress team made good progress with autoupdates and they address known problems fast. Never the less Wordpress is a worthy target. There are so many installations and the systems running Wordpress have usually good infrastructure. This servers are loved by people who need some bandwidth or some computing power.

So I motivated myself to get this open todo done. The goal was to get rid of any dynamic programming language on the web server. Of course I could have rewritten all the blog content in plane HTML by hand, but as mentioned I am very lacy. The other problem, this would have sucked. Over the years I reviewed multiple projects that could generate static webpages from reStructuredText, Markdown or AsciiDoc files. There are a lot of projects that work with the same pattern. You can write the content in Markdown and then generate the HTML content on your local machine and upload it to a webspace. The webspace don't needs PHP or any other language. You use your local machine to generate the HTML content. Since I run a lot of Python projects already, I searched for a well documented and structured solution based on Python. Pelican was the one that looked mature and well documented for me. And this page is the result. The theme I imported is called Flex and was quite easy to setup. There are a lot of additional plugins you can import and use. For example to generate a sitemap automatically. One more reason to choose Pelican was the wordpress import functionality. It is possible to import you content from the Wordpress backup file and generate .rst files from it. This made it much more easy for me to migrate the old content. Just the links to images needed some manual interaction.

The migration took me about two evenings to fix some old links for images and change some things I could have changed in Wordpress already.

I am very sorry that because of the migration two features are not available, yet. The first is the comment functionality and number two is the search. Both features where based on dynamic PHP code which is gone for now. I could have integrated an external service like disqus for comments, but the information would be shared with them and I don't want to force or trick someone to enter information on my side which goes to a company. Feel free to ping me on Twitter if you want to give feedback or if you have a question. You even can send me an e-mail if you want to keep it private or you don't want to use Twitter.

Some todos are still open and the site may change in the next weeks. I plan to modify the theme a little bit more and maybe tune some other things.