This is my static website's theme generated with Pelican.


I spend most of my time working on backend things, which means I know absolutely nothing about html/css/js and the unwritten rules of how to combine them into an elegant website.

So I built this to learn.


The easiest way to install this theme is:

  1. cloning it into a folder in your project:
$ git clone https://gitlab.com/bryanbrattlof/bryanbrattlof.com theme
  1. installing the plugin dependencies:
  • pelican-webassets to compile and minify all of the SCSS assets into their respective CSS files.

all of which can be installed via pip(env):

$ pip install -r theme/requirements.txt
  1. and editing your pelican settings file, and putting the theme's path into the THEME setting.
THEME = 'path/to/theme'


An example of the configuration changes needed to build this theme are located in the democonf.py.

These are their descriptions...


To activate the plugins needed to properly build this theme, you'll need to append the plugins into your PLUGINS setting.

   # ...
   # ...


This theme has some extra templates that need to be included:

    'index',     # root landing page
    'ubad',      # custom 404 page
    'sitemap',   # sitemap.xml

that will also need their URL and SAVE_AS settings:

# sitemap.xml
SITEMAP_URL = 'sitemap.xml'
SITEMAP_SAVE_AS = 'sitemap.xml'

# 404 page
UBAD_URL = '404/'
UBAD_SAVE_AS = UBAD_URL + 'index.html'


Because the SCSS assets aren't located inside the THEME_STATIC_PATHS directory, we have to add the folder to the assets ourselves.

WEBASSETS_SOURCE_PATHS = ['stylesheets']


To make things simpler (on me, not you) I've defined several webasset.Bundles to compile the SCSS assets into their minifed CSS output.

More information about these bundles is provided in the pelican-webassets README

        'articles_css', (
        ), {
            'output': 'css/article.css',
            'filters': [
    ), (
        'indexes_css', (
        ), {
            'output': 'css/index.css',
            'filters': [
    ), (
        '404_css', (
        ), {
            'output': 'css/404.css',
            'filters': [


webassets uses libsass to compile the SCSS files for us. However by default, libsass will not compress the files. Adding a line to WEBASSETS_CONFIG will allow libsass to minify the files as well as compile them.

    ('libsass_style', 'compressed'),


(optional) The twitter profile you wish to supply for the twitter:site in the Twitter cards.

TWITTER_HANDLE = '@bryanbrattlof'


(optional) The image you wish to use as your signature at the bottom of every page's footer.

LOGO_IMAGE = 'static/img/logo.png'


(optional) The license in (name, url) form you wish to include in the footer of every page.

    'Creative Commons Attribution-NonCommercial 4.0 International License.',

Want to Help?

Please feel free to help. Issues, pull requests, even patches via email, all are warmly welcomed.

License: WTFPL