The basic work flow in pelican blogging is to first generate content, verify it locally using a localhost:8000, and when everything is fine will publish it.

Pelican comes with two settings files to separate these 2 process. These two files are.


Let's check what is the use of these 2 files, and how to manipulate these files to get the most out of pelican.

These setting files are mostly passed to the templates associated with the themes to generate the site, all these settings are some parameters to these templates.

We had used the pelican-quickstart to generate this blog, when we use this command, we get a pre-configured and a files. This have the bare basic configuration to be used based on the questions we answered on the options.

These files basically contains the setting's identifier for the pelican blog, all the setting identifiers are in all-caps, and the values numbers (5, 20, etc.), Boolean (True, False, None, etc.), dictionaries, or tuples should not be enclosed in quotation marks. is used to generate the site locally and tested over localhost:8000. The basic would look like this.

#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals

AUTHOR = u'Animesh'
SITENAME = u'Hello World'

PATH = 'content'

TIMEZONE = 'Asia/Kolkata'


# Feed generation is usually not desired when developing

ARTICLE_PATHS = ['articles',]
ARTICLE_URL = 'articles/{slug}.html'
ARTICLE_SAVE_AS = 'articles/{slug}.html'

# Blogroll
LINKS = (('Pelican', ''),
         ('', ''),
         ('Jinja2', ''),
         ('You can modify those links in your config file', '#'),)

# Social widget
SOCIAL = (('You can add links in your config file', '#'),
          ('Another social link', '#'),)


# Uncomment following line if you want document-relative URLs when developing

If you remember correctly some of the settings value we had provided during the pelican-quickstart commands, like

    • This is the name of the site author which we had entered during the questions asked.
    • This is the Name of the site which we provided.
    • Since we still do not have domain name registered, we had kept this empty, and also it makes sense to keep this empty for localhost testing.
  • PATH
    • content where we write our blog is the default path set.
    • This we had entered during the initial process, and in future if we want to change this we can change these settings.
    • This was also entered during the pelican-quickstart process.
  • FEEDS_*
    • All the FEEDS_* related settings are empty because we have still not configured the RSS feeds settings, this we will change in the future.
    • This is the settings which we modified for keeping the path of the post into one folder.
    • This is a tuple of tuple, with each entry showing a link which you want provide in your blog.
    • This is also a tuple of tuple, where each entry is meant to point to a name of a social network say Facebook and the link to your profile.
    • This is a number showing how many blogs should be listed on the front page. Some Themes use this setting for some other purposes.

Now these settings are not fully exhaustive, Pelican has a huge list of setting, which we will revisit once we have the need of them.

Unlike, this setting file is only used when we are supposed to publish our blog to the domain hosting. This configuration is accessed when we generate the site using the following commands.

pelican content -s

The basic content of these files look like this.

#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals

# This file is only used if you use `make publish` or
# explicitly specify it as your config file.

import os
import sys
from pelicanconf import *


FEED_ALL_ATOM = 'feeds/all.atom.xml'
CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml'


# Following items are often useful when publishing


This file, basically build on top of the, as we can see from this line, from pelicanconf import *. What this means is all the configuration from is taken into consideration along with some specific configuration which is required for just publishing.

If you see this setting most of them are empty which we will fill one by one as we make progress in our blog, but from the structure you might get an idea that this file pertains to its integration with the DISQUS comment system, and the GOOGLE_ANALYTICS code. We will see the use of this code once we integrate these feature into our blog.


Subscribe To NewsLetter

Spread the word.... TwitterFacebookEmail

Related Posts


Last Updated

Pelican Blog Tutorials




Stay in Touch

Email Newsletter