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 the Archive Link #2

Open
jendiamond opened this issue Jun 18, 2015 · 0 comments
Open

Fix the Archive Link #2

jendiamond opened this issue Jun 18, 2015 · 0 comments

Comments

@jendiamond
Copy link
Member

The link in the side bar "ARCHIVES" should go to a page where all the posts are listed. Right now it is broken. The error is:

NameError at /archives  
undefined local variable or method `article_months' for #<Nesta::App:0x00000003640318>
file: app.rb location: archive_by_month line: 88

app.rb
  def archive_by_month
    article_months.each do |month_name|
      haml_tag :li do
        haml_tag :a, :id => "#{month_name}"
        haml_tag :h2, month
        haml_tag :ol do
          articles = Page.find_articles.select { |a| a.date.month == month }
          list_articles(articles)
        end
      end
    end
  end
jessejennings added a commit that referenced this issue Jun 22, 2015
Switched month to year in content/pages/archives.haml which lists post
titles by year.

Created a new issue #3 that retrieves titles by month.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant