{"action":"opened","issue":{"url":"https://api.github.com/repos/itafroma/jekyll-archive/issues/9","labels_url":"https://api.github.com/repos/itafroma/jekyll-archive/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/itafroma/jekyll-archive/issues/9/comments","events_url":"https://api.github.com/repos/itafroma/jekyll-archive/issues/9/events","html_url":"https://github.com/itafroma/jekyll-archive/issues/9","id":53984866,"number":9,"title":"Provide more robust filtering","user":{"login":"itafroma","id":277116,"avatar_url":"https://avatars.githubusercontent.com/u/277116?v=3","gravatar_id":"","url":"https://api.github.com/users/itafroma","html_url":"https://github.com/itafroma","followers_url":"https://api.github.com/users/itafroma/followers","following_url":"https://api.github.com/users/itafroma/following{/other_user}","gists_url":"https://api.github.com/users/itafroma/gists{/gist_id}","starred_url":"https://api.github.com/users/itafroma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itafroma/subscriptions","organizations_url":"https://api.github.com/users/itafroma/orgs","repos_url":"https://api.github.com/users/itafroma/repos","events_url":"https://api.github.com/users/itafroma/events{/privacy}","received_events_url":"https://api.github.com/users/itafroma/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/itafroma/jekyll-archive/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/itafroma/jekyll-archive/milestones/3","labels_url":"https://api.github.com/repos/itafroma/jekyll-archive/milestones/3/labels","id":565803,"number":3,"title":"0.x.0","description":null,"creator":{"login":"itafroma","id":277116,"avatar_url":"https://avatars.githubusercontent.com/u/277116?v=3","gravatar_id":"","url":"https://api.github.com/users/itafroma","html_url":"https://github.com/itafroma","followers_url":"https://api.github.com/users/itafroma/followers","following_url":"https://api.github.com/users/itafroma/following{/other_user}","gists_url":"https://api.github.com/users/itafroma/gists{/gist_id}","starred_url":"https://api.github.com/users/itafroma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itafroma/subscriptions","organizations_url":"https://api.github.com/users/itafroma/orgs","repos_url":"https://api.github.com/users/itafroma/repos","events_url":"https://api.github.com/users/itafroma/events{/privacy}","received_events_url":"https://api.github.com/users/itafroma/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2014-02-11T08:12:35Z","updated_at":"2015-01-11T07:37:57Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-01-11T07:37:56Z","updated_at":"2015-01-11T07:37:56Z","closed_at":null,"body":"Splitting off from #3, JAG should have more robust filtering now that you can have more than one archive. The idea is that `exclude` will become a nested mapping, with two keys—`categories` and `tags`—and will gain a complementary `include` nesting mapping with the same keys:\r\n\r\n```yaml\r\narchive:\r\n    - layout: archive\r\n      path: /blog/:year/:month/:day\r\n      title: Blog archive - :year/:month/:day\r\n      exclude:\r\n          tags: ['hidden']\r\n      include:\r\n          categories: ['blog']\r\n    - layout: archive\r\n      path: /blog/:year/:month\r\n      title: Blog archive - :year/:month\r\n      exclude:\r\n          tags: ['hidden']\r\n      include:\r\n          categories: ['blog']\r\n    - layout: archive\r\n      path: /blog/:year\r\n      title: Blog archive - :year\r\n      exclude:\r\n          tags: ['hidden']\r\n      include:\r\n          categories: ['blog']\r\n    - layout: archive\r\n      path: /projects/:year\r\n      title: Project archive - :year\r\n      include:\r\n          categories: ['projects']\r\n```\r\n\r\nThe logic with the `include` and `exclude` keys would be the following:\r\n\r\n- If `include` is missing, all posts will be included.\r\n- If `include` is present, only posts matching the include criteria will be included.\r\n- `exclude` is resolved after `include`.\r\n\r\nFor example, this would mean only posts in the `blog` category that do not have the `hidden` tag will be present in the archive type:\r\n\r\n```yaml\r\ninclude:\r\n    categories: ['blog']\r\nexclude:\r\n    tags: ['hidden']\r\n```"}}