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:

    1. The design must be based on Bootstrap
    2. Includes Fontawesome, Datatable, Lightbox2, and SyntaxHighlighter.
    3. Reuse elements I have designed for showcases, such as layout, CSS and images.
    4. Colors we like: blue(#337ab7) and red(#d52349).
    5. 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


    Dev structure

    If the Bible story happens today

    This is a common question any team/project will have to address — how to structure the knowledge we know of...

    Pandoc workflow

    Pandoc is awesome. I have been using it for the last six months now writing a reference architecture document for work. Here is some...

    Browser proxy

    This is a common trick. Say we have local machine (A), and a remote machine (B). If we can SSH from A→B, we can reroute browser traffic from A to B, much quicker than X-windows.