Cover design for PhD thesis

When I tell people I’m a product developer, they usually think of me as a graphic designer. If you’ve read some of my other posts, you probably know by now that this is not the same. I am not a graphic designer. However, I do enjoy creating something printable every now and then.

In this case, I was asked to help my dear friend Jaike Praagman out with a cover for her PhD thesis.

Please continue reading to see the result.

Upgrading Silex 1.x to 2.x

The purpose of this post

If you work on a Silex project once in a while, you’ve probably noticed there’s a new major version available.

The official upgrade guide was short and didn’t really help me tackle every issue. So in this post I’ll share the steps I had to take to upgrade my code to hopefully save you some time.

Tag clouds in Jekyll - no plugins required

Jekyll has built-in support for tagging of pages and posts, but doesn’t provide any functionality to create tag clouds. Because this is so common, there is a nice plugin for it: jekyll-tagging.

When upgrading to Jekyll 3.3.1 I found that the plugin stopped working. So I decided to cook my own simple solution to get it to work. In this post I’ll shortly explain how I solved it.

Snippet: sorting on custom date in Jekyll

On my blog I want to tag certain posts as “work” so that I can create a separate page that serves as a portfolio of my work. Because the date of the post isn’t always the date of the work I’ve done, some customisations were needed that were not directly available on the web or the Jekyll documentation.

I’ve added a category and custom date to the post’s front matter:

category: work
work_date: 2015-01-01 # format = YYYY-MM-DD

This gives us the necessary information to create a list of posts and a date to order them by. To solve the sorting issue, I used the following code:

{% assign sorted_posts = (site.categories.work | sort: 'work_date') %}
{% for post in sorted_posts reversed %}
<!-- your post here --> 
{% endfor %}

May it serve you well.

Snippet: Youtube videos in Jekyll - no plugins required

This solution utilises the ability to pass parameters to included files. You can pass the video ID to a generic YouTube embed code used on all pages.

Create file _includes/youtube.html containing the following code:

<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/{{ include.id }}?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>

Note: this uses the “privacy enhanced mode” and only the YouTube video ID has been parametrised.

To embed a Youtube video, use this in your posts:

{% include youtube.html id="_G790yZA5CA" %}
15678