Getting a Random Post at Compile Time in Jekyll

While pure Jekyll cannot do true random links to posts at page access, it is possible to insert a link to a random post at site compile time.

At it’s most basic, this can be done with the following liquid snippet which will select a random post from the ‘site.posts‘ collection and then insert that post’s title into the page. This can be expanded to extract other pieces of data from within the ‘post‘ object as you desire.

Continue reading “Getting a Random Post at Compile Time in Jekyll”

Converting PDFs to JPEG sequences using imagemagick

Imagemagick (available from all good package managers) has the ability to split a .pdf file into a set of numbered images via the following incantation…

convert -quality 100 -density 200 -colorspace sRGB <PathToPDF> -flatten <PathToOutputDirectory/>Page-%02d.jpeg

…where, of course, ‘%02d’ represents the auto-numbering element of the incantation.