lib/jekyll_build_search.rb in jekyll-lab-notebook-plugins-0.1.6 vs lib/jekyll_build_search.rb in jekyll-lab-notebook-plugins-0.1.7
- old
+ new
@@ -11,11 +11,11 @@
path = Pathname.new(site.dest) + "search.json"
converter = site.find_converter_instance(::Jekyll::Converters::Markdown)
search_list = []
- site.posts.docs.each do |post|
+ site.posts.docs.reverse_each do |post|
search_list.push(*build_post_hashes(post, converter))
end
FileUtils.mkdir_p(File.dirname(path))
File.open(path, 'w') do |f|
@@ -47,10 +47,10 @@
# pretty format dates
date = DateTime.parse(line.strip)
yearmonth = date.strftime("%Y_%m")
iddate = date.strftime("%Y%m%d")
- displaydate = date.strftime("%a, %b %e")
+ displaydate = date.strftime("%b %e, %Y")
# we've found a new entry, remove it from the previous entry's lines
curr_hash["content"].pop()
# extract project tags and flatten into a single array