Revive this Blog ################################## :date: 2013-02-17 14:26 :tags: openssh, dropbear 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 archive.org 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 https://web.archive.org/web/20121213091551/http://euer.krebsco.de/ 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 ----------------------- .. code-block:: bash #?/bin/sh virtualenv my-blog cd my-blog . bin/activate pip install pelican pelican-quickstart ... Importing RSS ------------- Pelican supports importing old rss feeds. I tried importing the archive.org 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
-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:

.. code-block:: bash

    #? /bin/sh
    . bin/activate
    yaourt -Sy aur/pandoc-static
    pelican-import --feed https://web.archive.org/web/20120709004415/http://euer.krebsco.de/atom.xml -o content/posts
    # cleanup all the posts in content/posts

Configure pelican 
-----------------
Pelican needs to be configured in ``pelicanconf.py``:

.. code-block:: python
    
    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', 'http://twitter.com/makefoo') ,)
    # add disqus comments
    DISQUS_SITENAME = 'euer'
    # all the other lines of config


Configure themes
----------------
Themes need to be retrieved separately.

.. code-block:: bash
   
    #? /bin/sh
    # omit --recursive for a subset, gum is in the core
    git clone --recursive https://github.com/getpelican/pelican-themes themes

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