Creating a blog based on Pelican

Apr 12, 2014 00:00 · 236 words · 2 minute read howto pelican

Pelican is a static website generator written in Python. It’s perfect for maintaining a tiny blog without having to mess around with databases. Static pages can be served from any Web server. Even your wireless router if you run custom firmware as Tomato by Shibby or dd-wrt.

Running Ubuntu Trusty I chose to use Pelican package in repository. A very quick recipe for creating a blog with the default theme.

  1. Install Pelican and package for Markdown language. With Markdown you write the content in text and Pelican translates it to HTML.

     apt-get install python-pelican python-markdown
  2. Make a directory where you want to maintain your blog.

     mkdir myblock; cd myblock
  3. Run the Pelican quick start script and answer all the questions. Add at least one method of uploading your blog to a web server.

  4. Start by creating your first page in content directory. Each page should have a heading with some metadata.

     Title: Creating a blog based on Pelican
     Date: 2014-04-12
     Category: Blog
     Tags: blog,howto
     Slug: 2014-04-12-pelican
     Author: arnulf
  5. Start the local HTTP server and check how your blog is coming along.

     make serve
  6. Point your browser to http://localhost:8000

  7. Upload your blog to your web server. I prefer the ssh upload option.

     make ssh_upload

A more lengthy and better getting started guide on I did find adam-p’s Markdown Cheatsheet on github quite useful. And not to forget all the themes you can download from github.