{"action":"created","issue":{"url":"https://api.github.com/repos/segmentio/metalsmith-collections/issues/75","repository_url":"https://api.github.com/repos/segmentio/metalsmith-collections","labels_url":"https://api.github.com/repos/segmentio/metalsmith-collections/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/segmentio/metalsmith-collections/issues/75/comments","events_url":"https://api.github.com/repos/segmentio/metalsmith-collections/issues/75/events","html_url":"https://github.com/segmentio/metalsmith-collections/pull/75","id":227142583,"number":75,"title":"Allow metadata-based filtering with `filterBy` option","user":{"login":"cgatno","id":7594943,"avatar_url":"https://avatars0.githubusercontent.com/u/7594943?v=4","gravatar_id":"","url":"https://api.github.com/users/cgatno","html_url":"https://github.com/cgatno","followers_url":"https://api.github.com/users/cgatno/followers","following_url":"https://api.github.com/users/cgatno/following{/other_user}","gists_url":"https://api.github.com/users/cgatno/gists{/gist_id}","starred_url":"https://api.github.com/users/cgatno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgatno/subscriptions","organizations_url":"https://api.github.com/users/cgatno/orgs","repos_url":"https://api.github.com/users/cgatno/repos","events_url":"https://api.github.com/users/cgatno/events{/privacy}","received_events_url":"https://api.github.com/users/cgatno/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-05-08T19:04:16Z","updated_at":"2018-04-08T23:40:53Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/segmentio/metalsmith-collections/pulls/75","html_url":"https://github.com/segmentio/metalsmith-collections/pull/75","diff_url":"https://github.com/segmentio/metalsmith-collections/pull/75.diff","patch_url":"https://github.com/segmentio/metalsmith-collections/pull/75.patch"},"body":"I added an example to the README as well as a test to show how this works, but basically it allows the user to pass a filter function to the `filterBy` option to enable metadata-based filtering.\r\n\r\nWe're currently using Metalsmith across a large project here at GrapeCity, and one of the plugins we've come to love and use most is the collections plugin. (By the way - **awesome** work! Metalsmith is working great and the plugins only make the experience better. We've been having a lot of fun and we've also increased our productivity quite a bit. Thank you!) Anyways, the collections plugin has been working great, but one feature we could really use is the ability to filter certain files out of the collection based on their metadata.\r\n\r\nWe've looked into implementing other solutions that would allow us to filter files _only_ out of collections (we still want them to be included in the build), but this seems like the simplest way. I took a whack at adding this myself, so hopefully I ticked all of the right boxes for approval.\r\n\r\nLet me know if you have any thoughts, comments, suggestions or questions! I'd love to hear what you think.\r\n\r\nI look forward to hearing back from you,\r\nChristian"},"comment":{"url":"https://api.github.com/repos/segmentio/metalsmith-collections/issues/comments/379592121","html_url":"https://github.com/segmentio/metalsmith-collections/pull/75#issuecomment-379592121","issue_url":"https://api.github.com/repos/segmentio/metalsmith-collections/issues/75","id":379592121,"user":{"login":"cgatno","id":7594943,"avatar_url":"https://avatars0.githubusercontent.com/u/7594943?v=4","gravatar_id":"","url":"https://api.github.com/users/cgatno","html_url":"https://github.com/cgatno","followers_url":"https://api.github.com/users/cgatno/followers","following_url":"https://api.github.com/users/cgatno/following{/other_user}","gists_url":"https://api.github.com/users/cgatno/gists{/gist_id}","starred_url":"https://api.github.com/users/cgatno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgatno/subscriptions","organizations_url":"https://api.github.com/users/cgatno/orgs","repos_url":"https://api.github.com/users/cgatno/repos","events_url":"https://api.github.com/users/cgatno/events{/privacy}","received_events_url":"https://api.github.com/users/cgatno/received_events","type":"User","site_admin":false},"created_at":"2018-04-08T23:40:53Z","updated_at":"2018-04-08T23:40:53Z","author_association":"NONE","body":"@dpobel Glad to hear it's working for you! We've been using it for a few months now without any issues. I think the changes are simple enough to work well in a variety of situations.\r\n\r\nI'm not sure about the maintenance status of this repo, looks like there has been some recent discussion in #80."}}
{"actor":{"display_login":"cgatno"}}