Jekyll: Config globs not working as expected

Created on 28 Mar 2018  ·  3Comments  ·  Source: jekyll/jekyll

  • [ ] I believe this to be a bug, not a question about using Jekyll.
  • [x] I updated to the latest Jekyll (or) if on GitHub Pages to the latest github-pages
  • [x] I ran jekyll doctor to check my configuration
  • [x] I read the CONTRIBUTION file at https://jekyllrb.com/docs/contributing/
  • [ ] This is a feature request.

  • [x] I am on (or have tested on) macOS 10+
  • [ ] I am on (or have tested on) Debian/Ubuntu GNU/Linux
  • [ ] I am on (or have tested on) Fedora GNU/Linux
  • [ ] I am on (or have tested on) Arch GNU/Linux
  • [ ] I am on (or have tested on) Other GNU/Linux
  • [ ] I am on (or have tested on) Windows 10+

  • [ ] I was trying to install.
  • [ ] There is a broken Plugin API.
  • [ ] I had an error on GitHub Pages, and I have reproduced it locally.
  • [ ] I had an error on GitHub Pages, and GitHub Support said it was a Jekyll Bug.
  • [ ] I had an error on GitHub Pages and I did not test it locally.
  • [x] I was trying to build.
  • [ ] It was another bug.

My Reproduction Steps

I'm currently assuming this is user error, so I am not providing repro steps at this point. If this sounds like a possible bug, I'll figure out a way to create a test repo.

I'd like to upgrade from 3.7.0 to 3.7.3, but the way path globbing changed has broken things, and my attempts to update based on the docs haven't yielded success.

I have a collection set up with various types of subfolders that require different defaults, sort of like this:

_collections/ (collections_dir)
  _people/
    employees/
      personA.md
      personB.md
    alumni/
      personC.md
      personD.md

old value
path: _collections/_people/employees/

new value
path: _collections/_people/employees/*

I assumed this was the way to continue to glob directories, but all of my defaults are no longer set, causing breakage.

When I do a verbose log, I see a bunch of this:

Globbed Scope Path: _collections/_people/employees/cameron-mcefee.md

I assume this means the glob is matching the files correctly (never mind that it seems repeat this for every single file), so I'm confused about why the defaults don't get set.

Front Matter Defaults frozen-due-to-age has-pull-request

Most helpful comment

:pray: The fix worked perfectly and 3.8.0 cut built times by ⅓.

All 3 comments

@cameronmcefee We would love to have a test-repo (or repro steps) to confirm whether the bug is in the code or in your settings..
The config setting you provided above is incomplete and therefore open to assumptions..

You're right, sorry, I should have started with a demo. Here's one: https://github.com/cameronmcefee/collection-path-default-test. Aside from the collection, the only thing that is different from the jekyll new boilerplate is https://github.com/cameronmcefee/collection-path-default-test/blob/master/_config.yml#L45-L67

Run with bundle exec jekyll serve --verbose.

I expect that Person A and B should have a value of alumni: true and C and D should have employee: true. However, all people in the list have false for both values.

In the output you'll see a lot of Globbed Scope Path, which I assume means Jekyll is aware of the files, it's just not applying the defaults.

:pray: The fix worked perfectly and 3.8.0 cut built times by ⅓.

Was this page helpful?
0 / 5 - 0 ratings