Closed andrewcroce closed 7 years ago
Digging into this a bit, in article.rb
line 46:
blog_inst = if options[:blog]
app.extensions[:blog][options[:blog]]
else
app.extensions[:blog].values.first
end
Its trying to access the blog instance by key, as if the keys were the same as the blog names. But they're not, the keys are instance_0
and instance_1
.
Just to confirm this issue does exist.
Same here. I’m using the 4.0.1 middleman-blog gem. Any updates on this ?
I just submitted a PR for this: #307. Note, this is really just a hack to get it working. I'm not a Ruby dev, just a Middleman user who needed this to work. There is certainly a better way to fix this, so the key names DO match the blog names.
Has this moved? Having the same issue.
Hiya
@mamela The PR was merged into Master - https://github.com/middleman/middleman-blog/pull/307
Please reference this in your Gemfile for now
gem "middleman-blog", git: "https://github.com/middleman/middleman-blog.git", branch: "master"
Closing as PR merged - if still an issue please re-open
Using middleman 4.1.7 and middleman-blog 4.0.1
When I attempt to generate an article using the --blog option, it fails. For example, I have a blogs named "blog" and "work"
middleman article 'Test' --blog work
I get:Similar error for the "blog" blog.
The command works fine without specifying the --blog option, and defaults to the first blog "blog".
Heres the blog activations from my config:
Thanks!
UPDATE: For the record, I have manually created article files in the "work" blog, and they do appear to be properly queried using
blog(work).articles
.