-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
[Bug]: 4.3 not reading data from site.<collection>
correctly.
#9165
Comments
site.<collection
correctly.site.<collection>
correctly.
@JKarlavige May I know how exactly you're logging the Is the repository accessible to public? |
@JKarlavige I have submitted a patch to fix the gem "jekyll", github: "jekyll/jekyll", ref: "refs/pull/9167/head" Thanks. |
Hi @ashmaroli, I can confirm your update looks to have fix the issues with the We have multiple On Jekyll 4.2.2, we were accessing these files using On the new version of Jekyll, the same call returns: In our frontmatter, we have an array of customers:
We are looping through this array, and pulling the data from the customer file under
However, when trying to get the customer file with the line: I am using the following command to log the data:
One note, it looks like calling individual files in the _data collection works. For example, we have a file in |
Hello, |
@JKarlavige Thank you for giving me additional context to reproduce the issue. I was able to create a sample using clues from your opening post and reproduce the error using the |
@suppadeliux Thank you for reporting the issue. |
Thanks for the quick fix! 🎉 🎉 🎉, everything is working as expected with the new version ( |
Operating System
macOS Monterey
Ruby Version
ruby 3.0.3p157
Jekyll Version
jekyll 4.3
GitHub Pages Version
No response
Expected Behavior
On version 4.2.2, we have a
_data
collection, reading data from here works as expected, for example:{{site.data.customers}}
. When logging the data, it shows an object with all properties.In collections where we use a
name
property, that property is set correctly on the site, for example when using:{{include.event.name}}
.Current Behavior
Seeing odd behavior when reading our _data with
site.data
. When logging the data it shows a Jekyll hash, rather than the actual object:site.data.customers: #<Jekyll::DataHash:0x000000012cad8db0>
The
name
property is also being replaced by the filename in all collections. In ourevents
collection, we have aname
property is each file within the collection, for example:name: Coalesce 2022
. However, thename
property is replaced with the filename on the site in Jekyll 4.3.0 when using{{include.event.name}}
. Screenshots below:The same is occurring for another collection
_resource-categories/case-studies.md
:And when logged, the name property is replaced with the file name:
Relevant log output
Code Sample
No response
The text was updated successfully, but these errors were encountered: