Hey So I am trying to work on my blog and having difficulty.
In my config.rb file I have this
activate :blog do |blog|
set options on blog
blog.prefix = “blog”
blog.permalink = “{title}.html”
blog.new_article_template = File.expand_path(’…/source/blog-template.erb’, FILE)
blog.layout = “article-layout”
end
and in my blog-template.erb I have this
title: <%= @title %>
date: <%= @date.strftime(’%F %R %Z’) %>
tags:
intro:
now I am not sure if this is correct. I want to add a introtext and have it output in my blog overview page
When I create a new article it goes and created it and shows
title: article-name
date: article-date
tags:
intro:
which is exactly what I want except how to I output intro???
in my overview page I have
<% blog.articles.each do |article| %>
<%= article.date.strftime(’%b %e %Y’) %>
<%= article.title %>
<%= article.intro %>
<% end %>
when I save this I get an error undefined method `intro’
I don’t get it I thought it should work since I created a new template and overriding the original…
Help