{"action":"created","issue":{"url":"https://api.github.com/repos/tightenco/jigsaw/issues/221","repository_url":"https://api.github.com/repos/tightenco/jigsaw","labels_url":"https://api.github.com/repos/tightenco/jigsaw/issues/221/labels{/name}","comments_url":"https://api.github.com/repos/tightenco/jigsaw/issues/221/comments","events_url":"https://api.github.com/repos/tightenco/jigsaw/issues/221/events","html_url":"https://github.com/tightenco/jigsaw/issues/221","id":327498669,"node_id":"MDU6SXNzdWUzMjc0OTg2Njk=","number":221,"title":"[Question] Hide draft posts from /build_production, but include in /build_local","user":{"login":"dirkolbrich","id":3765119,"node_id":"MDQ6VXNlcjM3NjUxMTk=","avatar_url":"https://avatars1.githubusercontent.com/u/3765119?v=4","gravatar_id":"","url":"https://api.github.com/users/dirkolbrich","html_url":"https://github.com/dirkolbrich","followers_url":"https://api.github.com/users/dirkolbrich/followers","following_url":"https://api.github.com/users/dirkolbrich/following{/other_user}","gists_url":"https://api.github.com/users/dirkolbrich/gists{/gist_id}","starred_url":"https://api.github.com/users/dirkolbrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirkolbrich/subscriptions","organizations_url":"https://api.github.com/users/dirkolbrich/orgs","repos_url":"https://api.github.com/users/dirkolbrich/repos","events_url":"https://api.github.com/users/dirkolbrich/events{/privacy}","received_events_url":"https://api.github.com/users/dirkolbrich/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-29T21:44:07Z","updated_at":"2018-06-03T07:59:44Z","closed_at":null,"author_association":"NONE","body":"Is there a way to hide/exclude a .md file/post from the posts collection when compiling to build_production, but have it included in build_local?\r\n\r\nThe YAML of the post.md file would be:\r\n```md\r\n---\r\nextends: _layouts.post\r\ntitle: post title\r\nauthor: me\r\nstatus: draft  // <-- this would change to status: published when ready, could also be draft: true/false\r\ndate: \"2018-05-29\"\r\n---\r\n\r\nlots of text.\r\n```\r\n\r\nI'm struggling with the collections helper methods. Thanks for the help.\r\n\r\n[Proposal] Maybe add a \"How to\" section to the docs?\r\n"},"comment":{"url":"https://api.github.com/repos/tightenco/jigsaw/issues/comments/394144614","html_url":"https://github.com/tightenco/jigsaw/issues/221#issuecomment-394144614","issue_url":"https://api.github.com/repos/tightenco/jigsaw/issues/221","id":394144614,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDE0NDYxNA==","user":{"login":"hellocosmin","id":1656595,"node_id":"MDQ6VXNlcjE2NTY1OTU=","avatar_url":"https://avatars3.githubusercontent.com/u/1656595?v=4","gravatar_id":"","url":"https://api.github.com/users/hellocosmin","html_url":"https://github.com/hellocosmin","followers_url":"https://api.github.com/users/hellocosmin/followers","following_url":"https://api.github.com/users/hellocosmin/following{/other_user}","gists_url":"https://api.github.com/users/hellocosmin/gists{/gist_id}","starred_url":"https://api.github.com/users/hellocosmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hellocosmin/subscriptions","organizations_url":"https://api.github.com/users/hellocosmin/orgs","repos_url":"https://api.github.com/users/hellocosmin/repos","events_url":"https://api.github.com/users/hellocosmin/events{/privacy}","received_events_url":"https://api.github.com/users/hellocosmin/received_events","type":"User","site_admin":false},"created_at":"2018-06-03T07:59:44Z","updated_at":"2018-06-03T07:59:44Z","author_association":"NONE","body":"If a collection is being used here, wouldn't it be possible to remove the collection items in the `afterCollections` [event](https://github.com/tightenco/jigsaw/pull/189)? I imagine one could `->map()` over it and reject any items that have the draft key, based on the environment?\r\n\r\nJust an idea - haven't tested it - but since `afterCollections` is fired before files are built, this should work."}}
{"actor":{"display_login":"hellocosmin"}}