middleman-blog icon indicating copy to clipboard operation
middleman-blog copied to clipboard

Docs problem on Setting up blog in an existing project

Open adamdill opened this issue 7 years ago • 2 comments

This isn't a code problem, but a tiny docs issue.

on https://middlemanapp.com/basics/blogging/ the instructions for activating the extension in an existing project are:

activate :blog do |blog|
  # set options on blog
end

Unfortunately, this doesn't work out of the box. This error is thrown:

NoMethodError at /blog/2012/01/01/example-article
undefined method `link' for nil:NilClass
[snip]/gems/middleman-blog-4.0.2/lib/middleman-blog/helpers.rb: in tag_path, line 86

Maybe the docs could be updated to include these two template options, so that the example works as specified?

activate :blog do |blog|
  # set options on blog
  blog.tag_template = "tag.html"
  blog.calendar_template = "calendar.html"
end

PS: love the project, thank you!

adamdill avatar Jul 20 '17 04:07 adamdill

thanks @adamdill just what I needed

dearshrewdwit avatar Oct 28 '17 14:10 dearshrewdwit

ℹ️ This issue is stale because it has been open for more than 90 days with no activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

markets avatar Apr 15 '24 18:04 markets