Skip to content

Commit

Permalink
Fix poetry subcat links in /content page
Browse files Browse the repository at this point in the history
  • Loading branch information
Khemarato Bhikkhu committed Jun 24, 2023
1 parent 960ef17 commit 3615b5a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ GEM
rexml (3.2.5)
rouge (4.1.2)
safe_yaml (1.0.5)
sass-embedded (1.63.5)
sass-embedded (1.63.6)
google-protobuf (~> 3.23)
rake (>= 13.0.0)
terminal-table (3.0.2)
Expand All @@ -115,4 +115,4 @@ DEPENDENCIES
webrick (~> 1.7)

BUNDLED WITH
2.4.10
2.4.6
2 changes: 0 additions & 2 deletions _categories/essays.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ similars:
- papers
- excerpts
- booklets
subcats:
- poetry
---

Essays are short pieces of writing that were published independently, for example on a blog.
Expand Down
5 changes: 4 additions & 1 deletion _includes/content-category-row.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<tr>
{% assign catcon = site.content | where: "category", include.category %}
{% assign poetrycon = catcon | where: "subcat", "poetry" %}
{% assign category = site.categories | find: "slug", include.category %}
<td>{% include_cached content_icon.html category=include.category %} <a href="{{ category.url }}">{{ category.title }}</a>
{% if category.subcats %}<ul>{% for subcat in category.subcats %}
{% if category.subcats or poetrycon.size > 0 %}<ul>{% if poetrycon.size > 0 %}
<li style="list-style:none;">{% include_cached content_icon.html subcat="poetry" %} <a href="/search/?q=%2Bis%3Apoetry&filter=%2Bin%3A{{ include.category }}">poetry</a> ({{ poetrycon | size }})</li>
{% endif %}{% for subcat in category.subcats %}
<li style="list-style:none;">{% include_cached content_icon.html category=include.category subcat=subcat %} <a href="/search/?q=%2Bis%3A{{ subcat }}">{{ subcat }}</a> ({{ catcon | where: "subcat", subcat | size }})</li>
{% endfor %}</ul>{% endif %}
</td>
Expand Down

0 comments on commit 3615b5a

Please sign in to comment.