You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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.
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 offoo:
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.
The text was updated successfully, but these errors were encountered: