class Jekyll::Drops::UrlDrop

def categories

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

def collection

def collection
  @obj.collection.label
end

def day

DD: 01..31
def day
  @obj.date.strftime("%d")
end

def fallback_data

def fallback_data
  @fallback_data ||= {}
end

def hour

hh: 00..23
def hour
  @obj.date.strftime("%H")
end

def i_day

D: 1..31
def i_day
  @obj.date.strftime("%-d")
end

def i_month

M: 1..12
def i_month
  @obj.date.strftime("%-m")
end

def long_day

ddd: Monday..Sunday
def long_day
  @obj.date.strftime("%A")
end

def long_month

MMMM: January..December
def long_month
  @obj.date.strftime("%B")
end

def minute

mm: 00..59
def minute
  @obj.date.strftime("%M")
end

def month

MM: 01..12
def month
  @obj.date.strftime("%m")
end

def name

def name
  Utils.slugify(@obj.basename_without_ext)
end

def second

ss: 00..59
def second
  @obj.date.strftime("%S")
end

def short_day

dd: Mon..Sun
def short_day
  @obj.date.strftime("%a")
end

def short_month

MMM: Jan..Dec
def short_month
  @obj.date.strftime("%b")
end

def short_year

YY: 00..99
def short_year
  @obj.date.strftime("%y")
end

def slug

def slug
  Utils.slugify(@obj.data["slug"]) || Utils.slugify(@obj.basename_without_ext)
end

def slugified_categories

all non-alphanumeric characters of the category replaced with a hyphen.
Similar to output from #categories, but each category will be downcased and
def slugified_categories
  Array(@obj.data["categories"]).each_with_object(Set.new) do |category, set|
    set << Utils.slugify(category.to_s)
  end.to_a.join("/")
end

def title

def title
  Utils.slugify(@obj.data["slug"], :mode => "pretty", :cased => true) ||
    Utils.slugify(@obj.basename_without_ext, :mode => "pretty", :cased => true)
end

def w_day

d: 1..7 (Monday..Sunday)
def w_day
  @obj.date.strftime("%u")
end

def w_year

may differ from CCYY for the first days of January and last days of December
CCYYw, ISO week year
def w_year
  @obj.date.strftime("%G")
end

def week

%W and %U do not comply with ISO 8601-1
WW: 01..53
def week
  @obj.date.strftime("%V")
end

def y_day

DDD: 001..366
def y_day
  @obj.date.strftime("%j")
end

def year

CCYY
def year
  @obj.date.strftime("%Y")
end