Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

page_articles.each doesn't pick the I18n language from the file name anymore #344

Open
andreamoro opened this issue Jun 15, 2017 · 5 comments

Comments

@andreamoro
Copy link

Expected behaviour

The same that was happening with v. 4.0.1 were everything was working fine.
Two separate blog instances in the config,rb were pulling out the list of content with the page_articles.each do

Actual behaviour

A page_articles.each do returns content only for the first of the two blogs only.

Steps to reproduce the problem

Config.rb file as

activate :i18n, :mount_at_root => false, :templates_dir => "content", :locales => [:en, :it]

activate :blog do |blogen|
blogen.name = "blogit";
blogen.prefix = 'en/blog'
...
end

activate :blog do |blogit|
blogit.name = "blogit";
blogit.prefix = 'it/blog'
...
end

Create two files, one with .en and one with the .it extension within

Use the page_articles method to pull out the list of content.

  • Please provide a repository or some tests we can run through
    I will try to put together a repository ASAP.

Additional information

  • Ruby version:
  • Middleman version: 4.2
  • Middleman Blog version: 4.0.2
  • OS version:
@iwarner
Copy link
Contributor

iwarner commented Jun 15, 2017

I dont believe much regarding this was updated in the latest version - please continue to use the older one in the meantime and I will investigate.

@andreamoro
Copy link
Author

Hi @iwarner not sure what to say. By the time I forced the 4.0.1 version everything gone back to work as normal.
Does this version include the template stuff and the i18n we discussed last time and for which you setup that repo?

@iwarner
Copy link
Contributor

iwarner commented Jun 15, 2017

You can see what changed in the commits:

a8dd9fe

My understanding is that page articles always pulled the default blog, and would not pull from two blogs.

@andreamoro
Copy link
Author

Hi @iwarner
this is the case until you don't specify the blog name in the frontmatter. By the time you have your file containing something like blog: blogname the right instance is pulled out and content rendered (so long you are on 4.0.1).

On 4.0.2 this suddenly got broken, but skimming the code I don't see anything strange that could have impacted this behaviour.

@github-actions github-actions bot added the Stale label Apr 12, 2024
@markets
Copy link
Member

markets commented Apr 15, 2024

ℹ️ This issue is stale because it has been open for more than 90 days with no activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot removed the Stale label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants