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

Collection opts aren't loaded - therefore no collections #64

Closed
howarddierking opened this issue Sep 4, 2016 · 1 comment
Closed

Collection opts aren't loaded - therefore no collections #64

howarddierking opened this issue Sep 4, 2016 · 1 comment

Comments

@howarddierking
Copy link

Hi - I'm trying to build up a collection of recent blog posts for a right nav section. I have the following configuration of the collections plugin.

  .use(collections({
    blogposts: '**/*.md'
  }))

Unfortunately, whenever I run this, I was never seeing any data in my collection (there should have been 25 items in the array, but the array was always empty). In digging into the source, the spot that seems to be breaking me is at https://github.com/segmentio/metalsmith-collections/blob/master/lib/index.js#L25. I'm not exactly sure why, but Object.keys always returns an empty array. Further, Object.getOwnPropertyNames also returns an empty array.

I'm running Node 6.0.0 - not sure whether something changed wrt the JavaScript interpreter or if I'm just doing something incredibly dumb, but I'm a little stumped at the moment.

thoughts?

@howarddierking
Copy link
Author

closing this as it was (as I had kind of suspected) user error. I had this plugin after the markdown plugin in the pipeline, so needed to look for *.html instead of *.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant