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

Fix #2 empty top month #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mehgellan
Copy link

In lib/archives_sidebar/app/views/archives_sidebar/_content.html.erb --> removed +1 from articles_by_month_path to fix the off by one bug in the month links on the sidebar.
From:
<%= link_to"#{month[:name]} #{counter}".html_safe, articles_by_month_path( month[:year], "%02i" % (month[:month]+1) ) %>
To:
<%= link_to"#{month[:name]} #{counter}".html_safe, articles_by_month_path( month[:year], "%02i" % (month[:month]) ) %>

However, the routes are now off by one so that when I click on September, the url says /2016/08...

<h3 class="sidebar_title"><%= sidebar.title %></h3>
<div class="sidebar_body">
<h3 class="sidebar-title"><%= sidebar.title %></h3>
<div class="sidebar-body">
Copy link

@nathanallen nathanallen Sep 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these changes relevant to the top month being empty?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants