chore: feed tweaks
This commit is contained in:
parent
2c517144d7
commit
b1d2693713
3 changed files with 4 additions and 10 deletions
|
@ -13,14 +13,8 @@ module.exports = {
|
||||||
let excerpt = ''
|
let excerpt = ''
|
||||||
|
|
||||||
// set the entry excerpt
|
// set the entry excerpt
|
||||||
if (entry.description)
|
if (entry.description) excerpt = entry.description
|
||||||
excerpt = entry.description.includes('p>')
|
if (entry.data?.post_excerpt) excerpt = md.render(entry.data.post_excerpt)
|
||||||
? entry.description
|
|
||||||
: `<p>${entry.description}</p>`
|
|
||||||
if (entry.data?.post_excerpt)
|
|
||||||
excerpt = md.render(entry.data.post_excerpt).includes('p>')
|
|
||||||
? md.render(entry.data.post_excerpt)
|
|
||||||
: `<p>${md.render(entry.data.post_excerpt)}</p>`
|
|
||||||
|
|
||||||
// if there's a valid entry return a normalized object
|
// if there's a valid entry return a normalized object
|
||||||
if (entry)
|
if (entry)
|
||||||
|
|
|
@ -14,7 +14,7 @@ module.exports = async function () {
|
||||||
url: link['href'],
|
url: link['href'],
|
||||||
tags: [...new Set(link['tags'].split(' '))],
|
tags: [...new Set(link['tags'].split(' '))],
|
||||||
date: link['time'],
|
date: link['time'],
|
||||||
description: link['extended'],
|
description: `${link['extended']}<br/><br/>`,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ module.exports = async function () {
|
||||||
url: `https://trakt.tv/movies/${item['movie']['ids']['slug']}`,
|
url: `https://trakt.tv/movies/${item['movie']['ids']['slug']}`,
|
||||||
id: item['movie']['ids']['trakt'],
|
id: item['movie']['ids']['trakt'],
|
||||||
tmdbId: item['movie']['ids']['tmdb'],
|
tmdbId: item['movie']['ids']['tmdb'],
|
||||||
description: item['movie']['overview'],
|
description: `${item['movie']['overview']}<br/><br/>`,
|
||||||
type: 'movie',
|
type: 'movie',
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Reference in a new issue