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

Resource content engine only loads one file in subfolders under _data #338

Closed
ayushn21 opened this issue Jun 16, 2021 · 3 comments · Fixed by #343
Closed

Resource content engine only loads one file in subfolders under _data #338

ayushn21 opened this issue Jun 16, 2021 · 3 comments · Fixed by #343
Labels
bug Something isn't working

Comments

@ayushn21
Copy link
Member

ayushn21 commented Jun 16, 2021

Bridgetown Version: 0.21

To Reproduce

  • Create a new project: bridgetown new data_test
  • Add content_engine: resource to bridgetown.config.yml
  • Create a directory under _data called "gallery"
  • Create two files under that directory called album_1.yml and album_2.yml and put some content in them
  • Run bundle exec bridgetown console and then site.data.gallery

Current behavior

Only the data from one of the album files will be printed.

>> site.data.gallery
{
  "album_2" => [
    [0] {
      "file" => "2.jpg"
    },
    [1] {
      "file" => "2.jpg"
    }
  ]
}

Expected behavior

The data from both files should be printed.

Computing environment:

  • OS: macOS 11.3.1
  • Ruby Version: 2.7.2p137
@ayushn21 ayushn21 added the bug Something isn't working label Jun 16, 2021
@jaredcwhite
Copy link
Member

Huh, that's definitely unexpected. 😕 I'm guessing there must be an inadvertent overwriting of a preinitialized hash lurking somewhere in there.

@ayushn21
Copy link
Member Author

Yeah it's pretty strange ... I took a quick peek at the code but couldn't see any obvious issue

@jaredcwhite
Copy link
Member

Huh, that's definitely unexpected. 😕 I'm guessing there must be an inadvertent overwriting of a preinitialized hash lurking somewhere in there.

Narrator: there was.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants