jekyll-thumbnail-filter

jekyll-thumbnail-filter

Related posts thumbnail filter for Jekyll

Jekyll Thumbnail Filter

Related posts thumbnail filter for Jekyll.

Jekyll Thumbnail Filter is a custom liquid filter for related posts thumbnails in the Jekyll static site generator.

Installation

Copy thumbnail_filter.rb into your Jekyll _plugins folder.

Usage

The filter will generate a link with the related post thumbnail as background image in the next order:

  • thumbnail_image in the Front Matter
  • First image in the post content, hosted or external.
  • Default background image of .thumbnail class in the CSS.

Example:

Inside the site.related_post loop.

{{ post.content | thumbnail_url: post.url, post.title }}

See the examples content for full examples and output.

TODO

  • Bundle the filter as a ruby gem
  • Move output to tests
jekyll logo

Want a Jekyll website built?

Hire a Jekyll developer