Revive this Blog

Sun 17 February 2013
By makefu

2 years ago i lost this blog in an unexpected VPS shutdown and of course i had no backups (duh!) and had not used any kind of version management. Thanks to at least the content of the blog left intact. I guess that's why it is sometimes called 'The WaybackUp Machine'.

My old blog can be found at and even the rss feed is intact.

The old blog was created using octopress, a static site generator written in ruby. Because the markdown files were essentially lost i thought it is time to try out something new. I chose pelican, a static site generator written in python because in a worst-case scenario i could fix the python code. I will also test out reStructured Text instead of Markdown.

Installation of pelican

virtualenv my-blog
cd my-blog
. bin/activate
pip install pelican

Importing RSS

Pelican supports importing old rss feeds. I tried importing the rss feed but besides the date and title of the post and the date the markup was pretty much broken, the code with line numbering resulted in a broken <pre>-table. This happens for rst and markdown output.

In addition the importer uses pandoc, a haskell markup transformer which is with all dependencies like 100mb in size.

For the records here is what was needed:

#? /bin/sh
. bin/activate
yaourt -Sy aur/pandoc-static
pelican-import --feed -o content/posts
# cleanup all the posts in content/posts

Configure pelican

Pelican needs to be configured in

AUTHOR = 'makefu'
SITENAME = 'only code is pure'
# rss feed to be built
FEED_ALL_ATOM = 'feeds/all.atom.xml'
# for RSS in the headline
MENUITEMS = (( 'RSS', '/feeds/all.atom.xml'),)

# add robots.txt
STATIC_PATHS = [ 'extra/robots.txt', ]
EXTRA_PATH_METADATA = { 'extra/robots.txt': {'path': 'robots.txt'}, }

# twitter link
SOCIAL = (('@makefoo', '') ,)
# add disqus comments
# all the other lines of config

Configure themes

Themes need to be retrieved separately.

#? /bin/sh
# omit --recursive for a subset, gum is in the core
git clone --recursive themes

# add the theme line to pelicanconf
echo 'THEME="themes/gum"' >>