Date

pelican is a Python based static website generator whose output can be directly hosted on Github.

To install do:

pip install pelican markdown

The following are also useful:

pip install typogrify ghp-import

Set up a new site:

mkdir mysite
cd mysite
pelican-quickstart

Add some content, put:

Title: My First Review
Date: 2010-12-03 10:20
Category: Review

Following is a review of my favorite mechanical keyboard.

in mysite/content/firstpost.md.

Build the site using:

pelican content

To use the site as a Github project site make sure there is a Git repo set up for the project and do:

ghp-import output
git push origin gh-pages

This will put the content of the site (i.e. the output directory) into the gh-pages branch of the Github project, which can be viewed from myusername.github.io/MyProject. Make sure that this path is set in the pelican-conf.py file in mysite, or else it won’t find the CSS and whatnot.

To add a custom theme download one, e.g.:

cd $HOME/web
git clone https://github.com/DandyDev/pelican-bootstrap3.git

and add the path to the theme to the pelican-conf.py by setting:

THEME = "path_to_theme"

Follow instructions here for adding social links, headers, bio etc. to the theme.


Comments

comments powered by Disqus