Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/jekyll-archives.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def read
def read_tags
if enabled? "tags"
tags.each do |title, posts|
Jekyll.logger.debug "Archives:" "Processing #{posts} with tag: #{title}"
@archives << Archive.new(@site, title, "tag", posts)
end
end
Expand All @@ -67,17 +68,21 @@ def read_tags
def read_categories
if enabled? "categories"
categories.each do |title, posts|
Jekyll.logger.debug "Archives:" "Processing #{posts} with tag: #{title}"
@archives << Archive.new(@site, title, "category", posts)
end
end
end

def read_dates
years.each do |year, posts|
Jekyll.logger.debug "Archives:" "Processing #{posts} in #{year}"
@archives << Archive.new(@site, { :year => year }, "year", posts) if enabled? "year"
months(posts).each do |month, posts|
Jekyll.logger.debug "Archives:" "Proccessing #{posts} in #{year}-#{month}"
@archives << Archive.new(@site, { :year => year, :month => month }, "month", posts) if enabled? "month"
days(posts).each do |day, posts|
Jekyll.logger.debug "Archives:" "Proccessing #{posts} on #{year}-#{month}-#{day}"
@archives << Archive.new(@site, { :year => year, :month => month, :day => day }, "day", posts) if enabled? "day"
end
end
Expand Down