So I’m having an issue where I get the following error when I run middleman build
error build/partials/marketing/loop/index.html
You must either specify the blog name in calling this method or in your page frontmatter (using the 'blog' blog_name)
...
...
...
When I run middleman
I do not get any errors.
I have several blogs that are set up as such:
blogone.html.erb
---
title: Blog One
blog: blogone
---
<% blog.articles.each do |article| %>
<li><a href="<%= article.url %>"><%= article.title %></a></li>
<% end %>
blogone/content.md
---
title: Content One
---
...
blogtwo.html.erb
---
title: Blog Two
blog: blogtwo
---
<% blog.articles.each do |article| %>
<li><a href="<%= article.url %>"><%= article.title %></a></li>
<% end %>
blogtwo/content.md
---
title: Content two
---
...
config.rb
# Blog One
activate :blog do |blog|
blog.name = "blogone"
blog.prefix = "blogone"
blog.permalink = "{title}.html"
blog.sources = "{year}-{month}-{day}-{title}.html"
blog.layout = "layout_article"
end
# Blog Two
activate :blog do |blog|
blog.name = "blogtwo"
blog.prefix = "blogtwo"
blog.permalink = "{title}.html"
blog.sources = "{year}-{month}-{day}-{title}.html"
blog.layout = "layout_article"
end
Now the built site actually works fine. However my CI tool doesn’t pass and therefore doesn’t deploy because the build fails. So I need to figure this out.