middleman / middleman-blog

Blog Engine Extension for Middleman
https://middlemanapp.com
MIT License
325 stars 179 forks source link

Docs problem on Setting up blog in an existing project #349

Open adamdill opened 7 years ago

adamdill commented 7 years ago

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!

dearshrewdwit commented 6 years ago

thanks @adamdill just what I needed

markets commented 4 months ago

ℹ️ 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.