feature: add favorite articles to now page

This commit is contained in:
Cory Dransfeldt 2023-05-05 09:25:17 -07:00
parent 28f8330579
commit 059ec28b00
No known key found for this signature in database
4 changed files with 37 additions and 3 deletions

View file

@ -9,7 +9,9 @@ module.exports = async function () {
getExtraEntryFields: (feedEntry) => {
const images = feedEntry['description']?.match(/<img [^>]*src="[^"]*"[^>]*>/gm) || []
return {
image: images.length ? images.map((image) => image.replace(/.*src="([^"]*)".*/, '$1'))[0] : '',
image: images.length
? images.map((image) => image.replace(/.*src="([^"]*)".*/, '$1'))[0]
: '',
}
},
}).catch((error) => {