Goal:
On build, convert blog’s front matter into data/posts.json
so that I can iterate over data.posts.json
with my shiny MVCofTheWeek.js
Background
Using the middleman-blog
gem, trying to convert blog front matter into a json file that’s stored in data/posts.json
Problem I can’t seem to access the blog.articles
, page_articles
, etc in config.rb
the way I can in a view (They seem to be on Middleman::Application::MiddlemanApplication1
). I can’t tell if I’m missing the proper helper method or need some extra configuration to get access to blog posts in config.rb
Attempts So far, I’ve tried the following but neither have blog in scope. :
- Explored building a custom extension and trying the
activate
- Accessing the posts in the
activate :blog
bloc but that is a different class (Middleman::Configuration::ConfigurationManager
) and doesn’t have#articles
Any ideas?