Generate a weblog with pelican

I'm testing pelican, a static blog generator written in python. From simple rst or markdown files (your blog entries), pelican can produce a nice blog with just a cli-tool command. Sources can be managed with your favourite DVCS and final site is easily hosted on any web server.

It seems to be nice so I try this tool, discover at he same time reStructuredText and blog it on the fly!

1 - Start with install pelican from pypi:

$ easy_install pelican

Note : Pelican has some dependancies so it could be better to install it in virtualenv.

2 - Simply create a minimal filesystem:

blog/sources       -- to store blog entry .rst files
blog/www           -- final web site directory
blog/   -- settings file

3 - Just edit to add general settings like title, author, URL and other stuff. Mine is very simple for now:

# -*- coding: utf-8 -*-
AUTHOR = u'Florent Lebreton (fle)'
SITENAME = u"/home/fle"


LINKS = (('planet django', ''),)

SOCIAL = (('viadeo', ''),)

4 - Then, write my first blog entry in sources/01-test.rst:

Hello world

:date: 2011-01-16
:tags: test, pelican
:category: python
:author: Florent Lebreton (fle)

Hello !

5 - Finally, just run the cli-tool like this:

$ cd blog
$ pelican -s -o www/ sources/

Pelican manages syndication, PDF generation, theming and other cool stuff. Take a look at Pelican page for more information.

Comments !