Pelican Part-1 #Basic Installation

Anumeha Agrawal
3 min readJun 19, 2018

--

Getting started with Pelican

Installation and Basic setup

Python is the foremost requirement for Pelican . In case you don’t have python install it .

After installing python we will install Pelican like this . :-

$ pip install pelican==3.7.1 markdown==2.6.8

This should install the following things for you:

  1. feedgenerator to generate the Atom feeds
  2. jinja2 for templating support pygments for syntax highlighting
  3. docutils for supporting reStructuredText as an input format
  4. pytz for timezone definitions
  5. blinker an object-to-object and broadcast signaling system
  6. unidecode for ASCII transliterations of Unicode text

You will need argparse as well if you are using Python 3

Lets us start with a Pelican Quickstart . Pelican quickstart helps in generating all the basic skeletal files by just answering a few questions on the terminal.

$ pelican-quickstart

This will somewhat looks like this:-

Now check your directory and it should look like this

The quickstart created five files and one new directory:

  • Makefile: make command convenience tasks for common operations such as running a development server, building a site and cleaning extraneous build files . Every production level project has a make file usually !
  • fabfile.py: A Fabric file that has some of the same types of commands as the Makefile.
  • develop_server.sh: shell script for running the development server
  • pelicanconf.py: settings file for your Pelican project.
  • publishconf.py: another (optional) settings file that can be considered as a "production" settings file when you move past the development phase and want to deploy your site
  • content: location for your markup files, which should be stored under pages and posts directories. This contains the actual content of the blog posts .

Now to check if everything is working , generate the quick start site by converting the content to HTML

$ make html

This creates an output folder with the following files

Now its time to test the basic site

$ make serve

Then visit http://localhost:8000 in your browser; you should be able to see a test site, which should look something like this:

You have now successfully installed Pelican !

Stay tuned for more updates

--

--

Anumeha Agrawal

I am a programming enthusiast with an urge to learn and discover new things related to computer science.