feature: add favorite articles to now page
This commit is contained in:
parent
28f8330579
commit
059ec28b00
4 changed files with 37 additions and 3 deletions
|
@ -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) => {
|
||||
|
|
Reference in a new issue