I18n blog article sources

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| %>

Minimal info here: https://middlemanapp.com/basics/blogging/#locale-specific-articles-and-localization

Will post example blog soon

Hello,

that were really intresting i search too a way to handle it with my three pages.

Silvio

@pixelchef

Do you found solution? I search same information,

Thanks
Silvio

You need to create two blog instances fur that to work, each of them out will have it’s own specific path that you can obtain either using the prefix or the source, or depending on your structure using a combination of them.

Hope that helps.