Jekyll 4.2.2 collections and folders within _collection


I’ve just updated to macOS 12.3, the latest homebrew, ruby 3.0.2, and so forth… I set up a site a few years ago where I had a _collection that contained a sub folder that contained most of the collection’s items. The collection was setup with output true. In my current setup, this sub folder seemed to break my site because when I put all the collection items directly into the _collection folder, the site builds successfully. Is my analysis correct or are some issues still remaining?

This is the error message that I was receiving:

bundler: failed to load command: jekyll (/Users/hepting/Sites/ 
/Users/hepting/.rbenv/versions/3.0.2/lib/ruby/3.0.0/fileutils.rb:1466:in unlink, Operation not permitted @ apply2files - /Users/hepting/Sites/ (Errno::EPERM)

and here is how I described the “works” collection in my _config.yml file:

    output: true
    permalink: /research/:collection/:title:output_ext

Best regards,

That error messages doesn’t really explain it to me :confused:

I have a folder structure like this for my collections:

  |  |——pages
  |  |——posts

The collections are _de and _en.
My _config.yml:

collections_dir: content
    output: true
    permalink: /:collection/:slug
    output: true
    permalink: /:collection/:slug

This works fine on macOS 12.3. I have to say I downgraded to ruby 2.7.3 last summer because Forestry didn’t support V3 yet.

Thanks for your example. A difference may be that I am not using a collections_dir?

Rather than posting that line with the error, can you please share the entire output when you attempt to build the Jekyll site? Also, if you have the code up on a public repo, it would be great if you share that.

Ignore my last request. I figured out your GitHub repo from the URL :slight_smile:

When I build your site, the error points to the following file:

The error looks something like this:

/ did not find the expected key while parsing a block mapping at line 347 column 5

The error message says the mapping issue occurs at line 347, but it is line 348 where you have the problem.

Your code looks like this:

  - kaku:
  date: Tue-08-Mar-2022
  theme: Truth
    -desc: Happy Tuesday
    - desc: Attendance

Take a look under line 347, where it says Administration: and you will see line 348 that looks like this:

-desc: Happy Tuesday

Add a space after the - like this:

- desc: Happy Tuesday

And now your Jekyll site will build! But, you will encounter one other issue if you do not fix it first. Since you last worked with Jekyll, Ruby removed a core product called webrick and you need that for Jekyll. Before you do anything else, run:

bundle add webrick

For good measure, type:

bundle install
bundle update

Then, fix the YML file issue, and your site should build.

Thanks for your followup. I haven’t updated my github repo in a while because I have changed my workflow. Based on your first post, I had intended to update the repo and restore the configuration that was giving me the error. I’ll post again when I have the error condition restored :slight_smile:

1 Like