Modified: Tue, 2021-Aug-24
What is SSG and Pelican?
SSG stands for static site generator. SSG is a software application that generates static pages. It usually generates static HTML pages from templates. Besides generating static pages, some SSG (usually Node.JS based SSG) also support SSR or server side rendering. But strictly speaking, SSR is not SSG, it is not serving pre-rendered HTML static pages.
Pelican is a static site generator written in Python. Instead of writing HTML, writers write markup languages like MarkDown. Then the articles are feeded into the SSG. One of the advantage of Pelican is that it is very strong at meta data (categories, tags) about articles or blogs.
Check out these themes, they are quite good:
You could also create your own theme or modify an existing theme.
Notes and Tips about Pelican
The official installation guide provides detail instructions on how to install Pelican. Here I would like to provide a few tips about Pelican
Pelican version 4.6.0 does not support Pygments 2.9.0. Install Pygments 2.8.1 instead.
If you do not need to generate static pages per author (it would make duplicate pages in the web site), you can configure these parameters:
AUTHORS_SAVE_AS = '' AUTHOR_URL = '' AUTHOR_SAVE_AS = ''
If you do not want Pelican to generate any tags related page, use this parameters:
TAGS_SAVE_AS = '' TAG_SAVE_AS = ''
Be sure to check out the plugins for Pelican
Among the plugins, webassets and sitemap are very useful.