First thoughts regarding Jekyll.

July 19, 2015

Yesterday, I started with Jekyll as a sideproject. After searching a while for themes on mademistakes and jekyllthemes I found Kaktus. I tried some other themes too, but only kaktus seems as minimalistic and maintainable as I wanted it to be.

After deleting some Google Analytics and Disqus stuff I digged in the Liquid template engine to create some lists based on a parameter. To my astonishment, it was pretty easy:

Create Jekyll post lists based on a parameter:

The page:

	{% include archive-list.html category="photography" %}

The post:

title:  "Some title"
category: photography

The include html:

{% for post in site.posts %}
    {% if include.category %}
        {% if post.category == include.category %} 
            <a href='{{ post.url }}'>{{ post.title }}</a>
        {% endif %}
    {% endif %} 
{% endfor %}

HowTo highlight Liquid tags:

For this post I needed to include some code containing Liquid tags like {% include xyz %} . I thought that I can print them with the {% highlight %} tag without being processed. I was wrong. Neither DuckDuckGo nor Google could return some useful information to that problem. In the end, I found the solution in the Jekyll Sources itself where they describe the {% highlight %} tag in the docs. You simply have to surround the code by the tags raw and endraw.