My goal is to let my non en locale-specific articles live under their respective directories.
I have a directory layout with the articles living inside the root locale folders (with the exception of en which is mounted at my root). I am trying to define my blog.sources to look first at locale and then, articles. It looks like config is only running on build time? My index.html.erb for /news is working but no articles are populating. Im using middleman 4.1.1.
|-locales
|--en.yml
|--jp.yml
|--etc.yml
|-source
|--localizable
|---news
|----index.html.erb
|-----kr
|------news
|-------articles
|--------page1.html.md
|-----jp
|------news
|-------articles
|--------page1.html.md
In my config file I have some ruby that should link to the different article locales.
activate :blog do |blog| blog.name = "news" blog.sources = "{lang}/news/articles/{year}-{month}-{day}-{title}" blog.permalink = "/{title}" blog.taglink = "tags/:tag.html" blog.layout = "/partials/post" blog.default_extension = '.md' end
My news page is pulling the local articles as well : <% blog('news').local_articles.group_by { |a| a.data[:contenttype] }.each do |contenttype, articles| %>