filter-categories and strict-ssl questions

This commit is contained in:
Will Boyd
2025-02-02 12:37:49 -05:00
parent 3bbf0274ce
commit faff0ec856
3 changed files with 22 additions and 13 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ export function author(post) {
}
// get array of decoded category names, filtered as specified in settings
export function categories(post) {
export function categories(post, config) {
if (!post.data.category) {
return [];
}
@@ -17,7 +17,7 @@ export function categories(post) {
.filter(category => category.$.domain === 'category')
.map(({ $: attributes }) => decodeURIComponent(attributes.nicename));
return categories.filter(category => !settings.filter_categories.includes(category));
return categories.filter((category) => !config.filterCategories.includes(category));
}
// get cover image filename, previously decoded and set on post.meta