As a Python house, Pelican is definitely a winner for our blog site. But like any software engineer who hold a high standard to his work, I got turned off by all the available themes. "Ugly", "Where is the document?", "Why my translation is not shown?", I felt running in a maze where there were reflections of exit everywhere, but none was real. "Well, if it's in Python, we can make one." Solution is that simple. Besides, we love Jinja2 template systems, and Pelican has spelled out everything we need.
Quickly we wrote down a few on wish list:
- The design must be based on Bootstrap
- Includes Fontawesome, Datatable, Lightbox2, and SyntaxHighlighter.
- Reuse elements I have designed for showcases, such as layout, CSS and images.
- Colors we like: blue(#337ab7) and red(#d52349).
- Google fonts
The actual work was pretty straightforward. Follow Pelican official document to set up a working directory:
├── static │ ├── bower_components │ ├── css │ │ └── my.css │ └── js │ ├── html5shiv.min.js │ └── respond.min.js └── templates ├── article.html ├── author.html ├── category.html ├── index.html ├── layout.html ├── page.html └── tag.html
bower_components has all the third party libraries. The key is the
layout.html which is the root template of all others. Once this is
set up, creating an individual page is simple. Just replace the
block content %} with relevant content and you are done.
Like what you see? Roll up your sleeves and make a new theme. 1,2,3, Go!
— by Feng Xia