Custom filters in jekyll
I’ve been using my own version of jekyll for awhile now, tonight I decided to upgrade my fork to the latest code from mojombo. I nuked my fork, and ended up re-implementing custom filters in jekyll 0.5. I’ve re-added everything back so its more in-keeping with the rest of jekyll. Instead of custom filters being enabled by default they are now disabled and you need to enable them through the YML config or by passing the --custom-filters parameter to jekyll.
Custom filters allow you to create your own liquid filters for use in your jekyll blog, you can create the filters as methods on a module inside a _filters directory of your site root. I’ve created an example below, which allows you to easily embed gists inside your site. The filter can be used by passing the gist id to the filter; <script type="text/javascript"
src="http://gist.github.com/gist_id.js"></script>
Hopefully in the future I will get round to releasing some more custom filters that can be used with jekyll. You can use jekyll with custom filters by using the gem from my fork, this can be obtained through github. For a quick install;
gem install sixones-jekyll -s http://gems.github.com