-
Notifications
You must be signed in to change notification settings - Fork 66
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
"pattern:" does not work in CLI #18
Comments
I think it don't depends on |
Any chance that that will be fixed? |
@BigZ94 why don't you link to your repo and I'll see if I can have a look for you. |
Bump. Any idea when this issue will be fixed? I'm following the tutorial at: http://www.robinthrift.com/posts/metalsmith-part-2-shaping-the-metal/ However, the collection (if defined in the index.js as a pattern) doesn't work. |
I don't know if this is relevant, but it's caught me out a few times. What I have noticed is that in various metalsmith plugins. they don't go deeper than the folder stated. I'm not sure if it's the same with collections. So I only have 1 collection per folder. |
I only had one collection and the CLI didn't work for me either. |
Something to watch out for, that I just see. The order of where the
|
* disclosure: I use |
nlundquist, did you get this fixed? All the 'not working' posts in this thread have little info and follow-up. This feature does and has always worked for me in metalsmith, but I've had a few frustrating hours with some of the other plugins that needed a specific setup to work. The plugin nature of Metalsmith clearly opens up opportunities, but it also seems to present issues due to the linear nature when parsing the plugins (so one thing must be before another, but after something else, and therefore certain combinations might not work). If it helps, In my build.js, the first plugin is collections, setup like this: Metalsmith(__dirname) The folders pags and posts are in an src folder. |
@simplyeffectiveweb 👍 |
I have run into the same issue. The pattern matching simply would not work via the CLI. I tried using every available example to see if it was just something I was doing wrong but nothing worked. Once I changed to use the metadata, it worked right away. |
I am currently using the CLI with this plugin, and it works just fine. As mentioned previously,
|
The bug looks like already fixed. The pattern works both via CLI and metadata. The only pitfall is that pattern's path is relative to source folder. So if |
This pitfall could be better documented as I suppose it's kind of obvious once you already know it. However my pattern |
Somehow i can only add files to my collection by setting the metadata collection in the file.
I can not select any files with the pattern attribute like following:
or
This will only give me an empty collection in the template
The text was updated successfully, but these errors were encountered: