-
Notifications
You must be signed in to change notification settings - Fork 162
Wrong handling of categories #247
Comments
I'll do some tests with jekyll to confirm that and accept your PR if it's ok. |
Sorry the the long silence treatment, I was out of town for a few weeks. |
@laedit I accepted your answer and continued to use my own patched version. However, today I compared again the output of Jekyll and Pretzel. In fact, Pretzel works like Jekyll when no pagination is used: both use only categories specified in the frontmatter. However, things are different when using pagination. I created a repro at https://github.com/thoemmi/pretzel-categories-test, alls posts are stored in But Pretzel adds When not using pagination, Pretzel is correct. It seems as without pagination it renders |
But it could be added as a config parameter: |
I've used Jekyll 2.5.3 for my tests. After upgrading to 3.0, I see the addtional categories from the path too. I'll create a PR to make it configurable as you suggested. |
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.
In Jekyll's documentation for variables it says for
page.categories
This links to the Front Matter documentation, where it states regarding
categories
:As far as I understand the docs, categories derive from the directory only if there are no categories specified in the front matter.
The text was updated successfully, but these errors were encountered: