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

singular vs. plural taxonomies #30

Open
ddierkes opened this issue Jul 20, 2019 · 1 comment
Open

singular vs. plural taxonomies #30

ddierkes opened this issue Jul 20, 2019 · 1 comment

Comments

@ddierkes
Copy link

ddierkes commented Jul 20, 2019

I am puzzled by what 'page.category' would be in the post_macros template. This is the code in the repo.

{% if page.category %}
  <div class="post__category">
    <a href="{{ get_taxonomy_url(kind="category", name=page.category) }}">{{ page.category }}</a>
  </div>
{% endif %}

But I suspect that this is supposed to be displaying the categories taxonomy outlined elsewhere in the theme and should in fact be more like this, no?

{% if page.taxonomies.categories %}
   <div class="post__category">
      {% for category in page.taxonomies.categories %}
         <a href="{{ get_taxonomy_url(kind="categories", name=category) }}">{{ category }}</a>
       {% endfor %}
  </div>
{% endif %}
@Keats
Copy link
Collaborator

Keats commented Jul 20, 2019

Looks like I forgot to update that bit when I changed the categories in Zola

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

No branches or pull requests

2 participants