Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page categories defined via :page-category: don't get added to site.categories #149

Closed
tkfu opened this issue Mar 13, 2017 · 1 comment
Closed
Assignees
Milestone

Comments

@tkfu
Copy link

tkfu commented Mar 13, 2017

I recently attempted to change over one of my documentation sites to using the new 2.0 method of defining page variables (:page-foo: instead of foo: in front matter), because it will improve reusability. Unfortunately, it broke my build.

Based on my octopress-debugger output, it's because the categories defined by :page-category: are getting added only to page.category, not site.categories. The build broke because I use site.categories in a liquid tag in my layout, and it tried to do a sort on a null object.

I did find a workaround, however: using :page-categories: [bar] adds the categories to site.categories the way it should. So this isn't currently an issue for me, but I thought I'd report it anyway, since the behaviour is inconsistent and the new method of defining page variables is now the recommended one.

I'd be happy to provide more logs or further information if needed.

@tkfu tkfu changed the title Page categories defined via :page-category: don't get added to site.categories Page categories defined via :page-category: don't get added to site.categories Mar 13, 2017
mojavelinux added a commit to mojavelinux/jekyll-asciidoc that referenced this issue May 21, 2017
@mojavelinux
Copy link
Member

Thanks for pointing this out. I didn't realize that Jekyll was merging category into categories (and tag into tags). The integrator will have to handle that when processing the AsciiDoc header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants