Jekyll-Timeago: Time ago date filter for Jekyll
Custom and simple implementation of
timeago date filter. Main features:
- Future time
- Level of detail
jekyll-timeago is an extension of Liquid filters, so you can use it in all your Liquid templates (Octopress as well). Liquid is markup language extracted from the e-commerce platform Shopify.
Source code, bug tracking and updates here.
You have 3 options for installing the plugin:
Via Jekyll plugin system
_config.yml file, add a new array with the key gems and the values of the gem names of the plugins you’d like to use. In this case:
Add this gem to your
Gemfile and run
To use this filter, just add the following to the top of another plugin (found under
Alternatively, you can simply copy this file directly into your
_plugins/ directory! :)
You are able to personalize the level of detail (from 1 up to 4, 2 by default) by passing a parameter:
The plugin allows you to modify the strings needed to build the time ago sentences. For do this, you must add some extra keys to your
_config.yml. You can simply copy them from this example file and translate it to your site’s language. Sample:
You can modify the level of detail to get higher or lower granularity:
Any kind of idea, bug or comment are welcome.