{"action":"closed","issue":{"url":"https://api.github.com/repos/Code52/pretzel/issues/247","labels_url":"https://api.github.com/repos/Code52/pretzel/issues/247/labels{/name}","comments_url":"https://api.github.com/repos/Code52/pretzel/issues/247/comments","events_url":"https://api.github.com/repos/Code52/pretzel/issues/247/events","html_url":"https://github.com/Code52/pretzel/issues/247","id":90482556,"number":247,"title":"Wrong handling of categories","user":{"login":"thoemmi","id":73690,"avatar_url":"https://avatars.githubusercontent.com/u/73690?v=3","gravatar_id":"","url":"https://api.github.com/users/thoemmi","html_url":"https://github.com/thoemmi","followers_url":"https://api.github.com/users/thoemmi/followers","following_url":"https://api.github.com/users/thoemmi/following{/other_user}","gists_url":"https://api.github.com/users/thoemmi/gists{/gist_id}","starred_url":"https://api.github.com/users/thoemmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoemmi/subscriptions","organizations_url":"https://api.github.com/users/thoemmi/orgs","repos_url":"https://api.github.com/users/thoemmi/repos","events_url":"https://api.github.com/users/thoemmi/events{/privacy}","received_events_url":"https://api.github.com/users/thoemmi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-23T20:24:00Z","updated_at":"2015-08-11T05:01:18Z","closed_at":"2015-08-11T05:01:17Z","body":"In 0fca5ab @laedit implemented that a post's categories come from both the folder and the front matter. Jekyll behanves different, and I think Pretzel's implementation is wrong.\r\n\r\nIn Jekyll's [documentation for variables](http://jekyllrb.com/docs/variables/#page-variables) it says for `page.categories`\r\n\r\n> The list of categories to which this post belongs. Categories are derived from the directory structure above the `_posts` directory. For example, a post at `/work/code/_posts/2008-12-24-closures.md` would have this field set to `['work', 'code']`. These can also be specified in the [YAML Front Matter](http://jekyllrb.com/docs/frontmatter/).\r\n\r\nThis links to the [Front Matter documentation](http://jekyllrb.com/docs/frontmatter/), where it states regarding `categories`:\r\n\r\n> Instead of placing posts inside of folders, you can specify one or more categories that the post belongs to. When the site is generated the post will act as though it had been set with these categories normally. Categories (plural key) can be specified as a [YAML list](http://en.wikipedia.org/wiki/YAML#Lists) or a space-separated string.\r\n\r\nAs far as I understand the docs, categories derive from the directory **only** if there are no categories specified in the front matter."}}