Update i.mjh.nz.config.js

This commit is contained in:
Ismaël Moret
2024-12-19 15:58:18 +01:00
committed by GitHub
parent af932a972c
commit 51bbe74046

View File

@@ -31,7 +31,8 @@ module.exports = {
...item,
title: getTitle(item),
description: getDescription(item),
categories: getCategories(item)
categories: getCategories(item),
icon: getIcon(item)
}
})
@@ -160,6 +161,10 @@ function getCategories(item) {
return item.category.map(c => c.value)
}
function getIcon(item) {
return item.icon && item.icon.length ? item.icon[0].src : null
}
function parseItems(content, channel, date) {
try {
const curr_day = date