Add safe filter to the frontmatter of content category page

This commit is contained in:
Leilukin 2024-06-10 13:32:47 +08:00 committed by Helen Chong
parent 049e5230fd
commit 102ffc356f

View File

@ -6,8 +6,8 @@ pagination:
permalink: /categories/{{ category | slugify }}/
eleventyExcludeFromCollections: true
eleventyComputed:
title: 'Content Category: "{{ category }}"'
desc: All contents under the "{{ category }}" category on {{ sitemeta.siteName | safe }}.
title: 'Content Category: "{{ category | safe }}"'
desc: All contents under the "{{ category | safe }}" category on {{ sitemeta.siteName | safe }}.
---
{% set contentCount = collections.contents | filterByCategory(category) | length %}