You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 8, 2024. It is now read-only.
We recently implemented locales in Contentful, and are pulling the .yaml files into Middleman just fine.
Now we need to rework all of our templates with the localization helpers as every single object in the .yaml file now has a :en-US: level...
But one issue we have encountered is that when we were proxying pages in a nested loop, these are no longer working. We have spent ~16 people hours on this and can't get it to work.
I am hoping somebody may have run into something similar and can either sympathize or better still offer up a solution? :-)
Is there possibly a conflict between middleman_contentful and the i18n middleman module?
Here are examples of our previous and new version of the code:
# Build james pages
data.oursite.alljamess.each do |id, james|
proxy "vs/#{james.slug}/index.html", "james.html", locals: { james: james }, :ignore => true
data.oursite.alljamess.each do |id, james2|
if james.name != james2.name
proxy "vs/#{james.slug}/#{james2.slug}/index.html", "james_james.html", locals: { james: james, james2: james2 }, :ignore => true
end
end
end
And the new version:
# Build james pages
data.oursite.alljamess.each do |id, james|
proxy "vs/#{james['slug']['en-US']}/index.html?l288=true", "james.html", locals: { james: james }, :ignore => true
data.oursite.alljamess.each do |id, james2|
if james.name['en-US'] != james2.name['en-US']
proxy "vs/#{james['slug']['en-US']}/#{james2['slug']['en-US']}/index.html", "james_james.html", locals: { james: james, james2: james2 }, :ignore => true
end
end
end
From testing, we see the pages in the outer loop are generated, but the inner ones don't.
simply put:
# Build james pages
data.oursite.alljamess.each do |id, james|
puts "a"
data.oursite.alljamess.each do |id, james2|
puts "b"
end
End
does not return abbbbbabbbbbabbbb... but returns aaaaaaaaaaaa
The text was updated successfully, but these errors were encountered:
We recently implemented locales in Contentful, and are pulling the .yaml files into Middleman just fine.
Now we need to rework all of our templates with the localization helpers as every single object in the .yaml file now has a :en-US: level...
But one issue we have encountered is that when we were proxying pages in a nested loop, these are no longer working. We have spent ~16 people hours on this and can't get it to work.
I am hoping somebody may have run into something similar and can either sympathize or better still offer up a solution? :-)
Is there possibly a conflict between middleman_contentful and the i18n middleman module?
Here are examples of our previous and new version of the code:
And the new version:
From testing, we see the pages in the outer loop are generated, but the inner ones don't.
simply put:
does not return abbbbbabbbbbabbbb... but returns aaaaaaaaaaaa
The text was updated successfully, but these errors were encountered: