Migrate blog to Pelican and GitHub Pages

Fri 24 July 2015

Installation

$ git clone https://github.com/ownport/notes.git
$ cd notes
$ docker build -t 'ownport.github.io' .

Update site

Run container and re-generate HTML pages

$ docker run -ti --rm --name 'notes' -v ${pwd}/engine:/data/engine ownport.github.io
$ cd /data/engine/
$ make html
$ exit

Publishing to GitHub

GitHub Pages offer an easy and convenient way to publish Pelican sites. There are two types of GitHub Pages: Project Pages and User Pages. Pelican sites can be published as both Project Pages and User Pages.

Outside of container you need to update GitHub pages in gh-pages branch

$ ./scripts/ghp-import engine/output/
$ git push origin gh-pages 

Plugins

PLUGIN_PATHS = ['plugins']
PLUGINS = ['sitemap',]

Links

Sitemap

Add to pelicanconf.py

SITEMAP = {
    'format': 'xml',
    'priorities': {
        'articles': 0.5,
        'indexes': 0.5,
        'pages': 0.5
    },
    'changefreqs': {
        'articles': 'monthly',
        'indexes': 'daily',
        'pages': 'monthly'
    }
}

Links