Creating a blog based on 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.

    pelican-quickstart
    
  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 getpelican.com. I did find adam-p's Markdown Cheatsheet on github quite useful. And not to forget all the themes you can download from github.

Comments