duncanlock.net

The Pelican quickstart site that we created in Part 1 used the default theme - which you will probably want to change or, at least, customize. In this post I break down the Pelican theme I created for this site and show you exactly how it’s built. I’ll be going through each part of the theme in depth, explaining why I did things that way and how each part works.

The theme for this site is professional grade - high quality, polished and responsive. It puts the focus on the reader, is 100% easy to read and works flawlessly at any screen size, including mobiles & tablets. It also takes into account best practices for both social media and Problematic, check error messages! : :abbr:`SEO (Search Engine Optimization)`, so that you can make the most of your writing.

Unknown interpreted text …

Continue reading “How I built this website, using Pelican: Part 2 - Themes”

Go through my config and explain each bit

Date based posts

ARTICLE_URL = 'blog/{date:%Y}/{date:%m}/{date:%d}/{slug}/'
ARTICLE_SAVE_AS = 'blog/{date:%Y}/{date:%m}/{date:%d}/{slug}/index.html'

YEAR_ARCHIVE_SAVE_AS = 'blog/{date:%Y}/index.html'
MONTH_ARCHIVE_SAVE_AS = 'blog/{date:%Y}/{date:%m}/index.html'
DAY_ARCHIVE_SAVE_AS = 'blog/{date:%Y}/{date:%m}/{date:%d}/index.html'

ARCHIVES_SAVE_AS = 'blog/index.html'

Gotchas

The config file is a python script

This is really great, once you get the hang of it, but for some reasons, the settings documented here aren’t in python syntax, so you can’t just copy & paste them. For example, these three settings from there :

AUTHOR
MARKUP (('rst', 'md'))
STATIC_PATHS (['images'])

need to look something like this, when you put them into your pelican …

Continue reading “How I built this website, using Pelican: Part 3”