Skip to content

Commit

Permalink
Testing...
Browse files Browse the repository at this point in the history
  • Loading branch information
janosrusiczki committed Oct 3, 2023
1 parent 0173783 commit 1b3f35c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion _plugins/year_utilities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ def render(context)
the_result = nil

all_posts = context.registers[:site].posts.docs
years = all_posts.map { |post| post.date.year }.uniq
years = all_posts.map { |post|
puts post.date
post.date.year
}.uniq

if @text.start_with? "year_links"
years.map { |year| "<a href='/#{year}/' class='year-link'>#{year}</a>" }.join(', ')
Expand Down

0 comments on commit 1b3f35c

Please sign in to comment.