Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debug logging to assist in troubleshooting #144

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
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 @@ -60,6 +60,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 @@ -68,17 +69,21 @@ def read_tags
def read_categories
if enabled? "categories"
categories.each do |title, posts|
Jekyll.logger.debug "Archives:" "Processing #{posts} with category: #{title}"
@archives << Archive.new(@site, title, "category", posts)
end
end
end

def read_dates
years.each do |year, y_posts|
Jekyll.logger.debug "Archives:" "Processing #{y_posts} in #{year}"
append_enabled_date_type({ :year => year }, "year", y_posts)
months(y_posts).each do |month, m_posts|
Jekyll.logger.debug "Archives:" "Proccessing #{m_posts} in #{year}-#{month}"
append_enabled_date_type({ :year => year, :month => month }, "month", m_posts)
days(m_posts).each do |day, d_posts|
Jekyll.logger.debug "Archives:" "Proccessing #{d_posts} on #{year}-#{month}-#{day}"
append_enabled_date_type({ :year => year, :month => month, :day => day }, "day", d_posts)
end
end
Expand Down