jekyll-archives-dir-category 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll-archives-dir-category/version.rb +1 -1
- data/lib/jekyll-archives-dir-category.rb +15 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 851d4fda6842f27e53d5a044b417f1c50a04080bc040d3aa868f891d5c0135de
|
4
|
+
data.tar.gz: a8722f129daeee0f4205e388a9c47292d2141591b37839b56a2d57aecbf1aee1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e82ea052f9467b2322bd99b7e32c1c17a8d32e02a3b7ab9f2ee93b232ed50057f9bfc622502bb4a4dc6896a103a8e82b4adf76e15b16d38f7c8b4d692872d8f6
|
7
|
+
data.tar.gz: dad00cdf6a717b1ab90892219416909a3d4a11613693567e25a63962e58688d05265c9f67709fc9ad4d540ccb963dfd840299c3a27fbf0b6140843a198f53c8e
|
@@ -109,6 +109,7 @@ module Jekyll
|
|
109
109
|
category_info << c
|
110
110
|
end
|
111
111
|
site.data["category-info"] = category_info
|
112
|
+
print category_info.inspect
|
112
113
|
end
|
113
114
|
|
114
115
|
# the category info from '_category.yml' file
|
@@ -133,9 +134,9 @@ module Jekyll
|
|
133
134
|
info["priority"] = category_info["priority"] if !category_info["priority"].nil?
|
134
135
|
end
|
135
136
|
if info["href"].nil?
|
136
|
-
info["
|
137
|
+
info["post_count"] = 0
|
137
138
|
else
|
138
|
-
info["
|
139
|
+
info["post_count"] = @posts.docs.count { |a|
|
139
140
|
a.data["category"].start_with? info["href"]
|
140
141
|
}
|
141
142
|
end
|
@@ -233,20 +234,27 @@ module Jekyll
|
|
233
234
|
dates_info_days = []
|
234
235
|
days(m_posts).each do |day, d_posts|
|
235
236
|
append_enabled_date_type({ :year => year, :month => month, :day => day }, "day", d_posts)
|
236
|
-
dates_info_days <<
|
237
|
+
dates_info_days << {
|
238
|
+
"day" => "%02d" % day.to_i,
|
239
|
+
"post_count" => @posts.docs.count {|p| p.date.year == year.to_i && p.date.month == month.to_i && p.date.day == day.to_i },
|
240
|
+
}
|
237
241
|
end
|
238
242
|
dates_info_months << {
|
239
243
|
"month" => "%02d" % month.to_i,
|
240
|
-
"days" => dates_info_days.sort{|a, b| b <=> a},
|
244
|
+
"days" => dates_info_days.sort{|a, b| b["day"] <=> a["day"]},
|
245
|
+
"post_count" => @posts.docs.count {|p| p.date.year == year.to_i && p.date.month == month.to_i },
|
241
246
|
}
|
242
247
|
end
|
243
248
|
dates_info_years << {
|
244
249
|
"year" => "%04d" % year.to_i,
|
245
|
-
"months" => dates_info_months.sort{|a, b| b["month"] <=> a["month"]}
|
246
|
-
|
250
|
+
"months" => dates_info_months.sort{|a, b| b["month"] <=> a["month"]},
|
251
|
+
"post_count" => @posts.docs.count {|p| p.date.year == year.to_i },
|
252
|
+
}
|
247
253
|
end
|
248
254
|
|
249
|
-
@site.data["
|
255
|
+
@site.data["date-info"] = dates_info_years.sort{|a, b| b["year"] <=> a["year"]}
|
256
|
+
print "\n=================================\n"
|
257
|
+
print @site.data["date-info"].inspect
|
250
258
|
end
|
251
259
|
|
252
260
|
# Checks if archive type is enabled in config
|