class Jekyll::Drops::UrlDrop
Public Instance Methods
categories()
click to toggle source
# File lib/jekyll/drops/url_drop.rb, line 29 def categories category_set = Set.new Array(@obj.data['categories']).each do |category| category_set << category.to_s.downcase end category_set.to_a.join('/') end
collection()
click to toggle source
# File lib/jekyll/drops/url_drop.rb, line 12 def collection @obj.collection.label end
day()
click to toggle source
# File lib/jekyll/drops/url_drop.rb, line 45 def day @obj.date.strftime("%d") end
hour()
click to toggle source
# File lib/jekyll/drops/url_drop.rb, line 49 def hour @obj.date.strftime("%H") end
i_day()
click to toggle source
# File lib/jekyll/drops/url_drop.rb, line 61 def i_day @obj.date.strftime("%-d") end
i_month()
click to toggle source
# File lib/jekyll/drops/url_drop.rb, line 65 def i_month @obj.date.strftime("%-m") end
minute()
click to toggle source
# File lib/jekyll/drops/url_drop.rb, line 53 def minute @obj.date.strftime("%M") end
month()
click to toggle source
# File lib/jekyll/drops/url_drop.rb, line 41 def month @obj.date.strftime("%m") end
name()
click to toggle source
# File lib/jekyll/drops/url_drop.rb, line 16 def name Utils.slugify(@obj.basename_without_ext) end
second()
click to toggle source
# File lib/jekyll/drops/url_drop.rb, line 57 def second @obj.date.strftime("%S") end
short_month()
click to toggle source
# File lib/jekyll/drops/url_drop.rb, line 69 def short_month @obj.date.strftime("%b") end
short_year()
click to toggle source
# File lib/jekyll/drops/url_drop.rb, line 73 def short_year @obj.date.strftime("%y") end
slug()
click to toggle source
# File lib/jekyll/drops/url_drop.rb, line 25 def slug Utils.slugify(@obj.data['slug']) || Utils.slugify(@obj.basename_without_ext) end
title()
click to toggle source
# File lib/jekyll/drops/url_drop.rb, line 20 def title Utils.slugify(@obj.data['slug'], :mode => "pretty", :cased => true) || Utils.slugify(@obj.basename_without_ext, :mode => "pretty", :cased => true) end
y_day()
click to toggle source
# File lib/jekyll/drops/url_drop.rb, line 77 def y_day @obj.date.strftime("%j") end
year()
click to toggle source
# File lib/jekyll/drops/url_drop.rb, line 37 def year @obj.date.strftime("%Y") end