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 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}"
kriation marked this conversation as resolved.
Show resolved Hide resolved
@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