Migrating from Octopress to Pelican: Part 2

Last time I went through the basic setup for pelican. Today I will be working on making layout tweaks and adding some whistles and bells.

Get a new theme

I have to do this first, the default theme is hideous. Themes are available from this repo, along with instructions for the setup.

Clone the themes repo to somewhere on your local machine. I’m using the pure theme for now - I avoided the entirety of the pelican-themes repo as it seemed a bit excessive. And it requires submodule management.

git clone git@github.com:PurePelicanTheme/pure-single.git ~/projects/8888-88-88_jothamcity/pelican-themes/pure-single
echo "pelican_themes/*" >> ~/projects/8888-88-88_jothamcity/.gitignore
pelican-themes -vi ~/projects/8888-88-88_jothamcity/pelican-themes/pure-single
Installing themes...
Copying `pelican-themes/pure-single/' to `/home/joth/venvs/8888-88-88_jothamcity/lib/python2.7/site-packages/pelican/themes/pure-single' ...

Add the theme to pelicanconf.py, with a path relative to location of pelicanconf.py.

THEME = "pelican-themes/pure-single"

Deploy the site locally and check out the new theme.

make devserver
./develop_server.sh stop

This theme requires some configuration. For example, in pelicanconf.py:

THEME = "pelican-themes/pure-single"
SOCIAL = (
    ('github-alt', 'https://github.com/uberguy'),
    ('twitter', 'https://twitter.com/tommywilson'),
    ('linkedin', 'ca.linkedin.com/in/marktwain')
)
DISQUS_SITENAME = 'mydisqus'
DISQUS_ON_PAGESE = True
GOOGLE_ANALYTICS = 'UA-00000000-0'
COVER_IMG_URL = '/images/sidebarimage.jpg'

Note that the first element of the tuples in SOCIAL is the fontawesome icon name.

Setup License

The CC license has been implemented in the bootstrap-3 theme by Hilmar Lapp. So I added it in pure-single with this commit.

Migrate posts

Dornea has an excellent post on this process, which I used for this.

After the initial conversion, there were still some tweaks to make.

Plugins and a little bit about git submodules

I am not using them for now so will omit this section and just point out that plugins are found at the github plugin repo.

Go Top
comments powered by Disqus