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

Config globs not working as expected #6879

Closed
5 of 18 tasks
cameronmcefee opened this issue Mar 27, 2018 · 3 comments · Fixed by #6885
Closed
5 of 18 tasks

Config globs not working as expected #6879

cameronmcefee opened this issue Mar 27, 2018 · 3 comments · Fixed by #6885
Labels
Front Matter Defaults frozen-due-to-age has-pull-request Somebody suggested a solution to fix this issue

Comments

@cameronmcefee
Copy link

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

  • 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.
  • 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.

@ashmaroli
Copy link
Member

@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..

@ashmaroli ashmaroli added the pending-feedback We are waiting for more info. label Mar 29, 2018
@cameronmcefee
Copy link
Author

cameronmcefee commented Mar 29, 2018

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.

@jekyllbot jekyllbot added has-pull-request Somebody suggested a solution to fix this issue and removed pending-feedback We are waiting for more info. labels Mar 29, 2018
@cameronmcefee
Copy link
Author

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

@jekyll jekyll locked and limited conversation to collaborators Sep 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Front Matter Defaults frozen-due-to-age has-pull-request Somebody suggested a solution to fix this issue
Projects
None yet
3 participants