Ch.-F. Voigt


This blog has been hibernated—been writing elsewhere if at all lately. ;)

Mr Poole - New Commands for Link and Video Posts

Mr Poole, my Alfred workflow for Jekyll sites, has been updated with two new commands for link posts and video posts.

The New link post command uses an Applescript to read the current URL, its title and the current selection from Safari. It creates a new draft in which it fills in the front matter including the link variable and, if text is selected in Safari, it add it as a Markdown quote.

The New video post command basically does something similar. It checks whether the URL is that of a Youtube or Vimeo video. If that’s the case, it strips the video’s ID from the URL and fills in the front matter with the video ID. It also adds selected text as a quote.

Building a Sitemap for Jekyll with Liquid

Thanks to David Ensinger for publishing his Liquid sitemap.xml! If you use it, don’t forget to add the YAML front matter to make Jekyll process the file (since David’s post, nil has been changed to null):

layout: null

Link Posts for Jekyll Sites

There are some popular blogs like daring fireball, the loop or which use the so-called linked-list blog style where the headline links go to external URL instead of the post’s permalink. The post itself usually consists of a quote and a comment on it by the blog author. In my opinion linked lists are a reader-friendly way of posting links to interesting external resources.

In Jekyll, linked-list style posts are not possible out of the box. It is very easy to implement this feature though. This post’s headline links to a GitHub repository in which you can find instructions and example code. To open this posts permalink instead, just click the infinity sign in the meta data line.

Video Posts for Jekyll Sites

One of the things I missed in Jekyll when I switched from Wordpress was a frictionless way of posting videos to my website1. My idea was to add the video’s ID to the YAML front matter of the post and have Jekyll insert the embed code only if a video ID is given. Thanks to Jekyll’s Liquid templating capabilities, this was not difficult to implement.

I have also added a new command to my Jekyll workflow for Alfred which uses an AppleScript to grab the title and URL of a Youtube or Vimeo page in Safari, extracts the video ID and creates a new draft with the front matter filled in. The workflow command reduces the time it takes to make a video post to about 5 seconds plus the time you need to write your comment. I will update the workflow repository soon.

You can find the instructions as well as two example files in this Github Repository.

  1. True, there is no video on this website. But I am a teacher and run a website for my students on which I post interesting links, images, quotes and, yes, videos. At the end of the school year, I deleted my Wordpress site and am now preparing its Jekyll successor. ↩︎