Skip to content

Commit

Permalink
[#198] Fixes bug that each language's blog page would list categories…
Browse files Browse the repository at this point in the history
… from all posts from all languages, not just the ones used in its own language
  • Loading branch information
Schepp committed Jan 20, 2024
1 parent 79c35ad commit 5ec7c85
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/_includes/partials/blog/loop-blog-categories.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
{%- include partials/utility/dynamic-headerlevel level: headerlvl title: translations[locale].categories -%}

<ul role="list" class="category-list">
{%- for category in collections.blogCategories -%}
{% assign collectionKey = "blogCategories_" | append: locale %}
{%- for category in collections[collectionKey] -%}
<li>
<a href="/{{ translations[locale].blogsURL }}/{{ translations[locale].category }}/{{ category.slug }}" class="tag-link tag-link--large">{%- tag category.title -%}
</a>
Expand Down
2 changes: 1 addition & 1 deletion src/en/blog/category/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"permalink": "/{{ translations[locale].blogsURL }}/{{ translations[locale].category }}/{%- if category.slug -%}{{ category.slug }}/{%- endif -%}index.html",
"tags": "pages",
"pagination": {
"data": "collections.blogCategories",
"data": "collections.blogCategories_en",
"size": 1,
"alias": "category"
},
Expand Down
2 changes: 1 addition & 1 deletion src/nl/blog/categorie/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"permalink": "/{{ translations[locale].blogsURL }}/{{ translations[locale].category }}/{%- if category.slug -%}{{ category.slug }}/{%- endif -%}index.html",
"tags": "pages",
"pagination": {
"data": "collections.blogCategories",
"data": "collections.blogCategories_nl",
"size": 1,
"alias": "category"
},
Expand Down

0 comments on commit 5ec7c85

Please sign in to comment.