Sha256: 824d7713c184721e87ae12d6acf431699813352ecf79e6a00be09f434a2445e0
Contents?: true
Size: 493 Bytes
Versions: 3
Compression:
Stored size: 493 Bytes
Contents
module Jekyll module Timeago class Tag < Liquid::Tag def initialize(tag_name, dates, tokens) super @dates = dates.strip.split(' ') end def render(context) from, to = @dates[0], @dates[1] config = context.registers[:site].config.fetch('jekyll_timeago', {}) if to Jekyll::Timeago::Core.timeago(from, to, config) else Jekyll::Timeago::Core.timeago(from, config) end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
jekyll-timeago-0.9.2 | lib/jekyll-timeago/tag.rb |
jekyll-timeago-0.9.1 | lib/jekyll-timeago/tag.rb |
jekyll-timeago-0.9.0 | lib/jekyll-timeago/tag.rb |