mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig.space.git
synced 2025-12-13 16:26:50 +00:00
Trim feed size
Link to shownotes for older episodes
This commit is contained in:
@@ -130,14 +130,21 @@ const parseEpisode = e => {
|
||||
}
|
||||
|
||||
// episodes
|
||||
feed.rss.channel.item = feed.rss.channel.item.map(item => {
|
||||
feed.rss.channel.item = feed.rss.channel.item.map((item, index) => {
|
||||
const episode = parseEpisode(item)
|
||||
episodes.push(episode)
|
||||
|
||||
const link = `https://einundzwanzig.space/podcast/${episode.slug}`
|
||||
let description = episode.description
|
||||
if (index > 20) {
|
||||
description = `Shownotes: ${link}`
|
||||
}
|
||||
|
||||
const updated = {
|
||||
...item,
|
||||
link: `https://einundzwanzig.space/podcast/${episode.slug}`, // replace Anchor link
|
||||
'itunes:summary': episode.description // please the validator, Anchor's itunes:summary contains HTML
|
||||
link, // replace Anchor link
|
||||
description,
|
||||
'itunes:summary': description // please the validator, Anchor's itunes:summary contains HTML
|
||||
}
|
||||
|
||||
if (episode.number) {
|
||||
@@ -203,8 +210,6 @@ const parseEpisode = e => {
|
||||
return updated
|
||||
})
|
||||
|
||||
writeJSON('feed', feed)
|
||||
|
||||
const outputXML = builder.build(feed)
|
||||
|
||||
writeJSON('episodes', episodes)
|
||||
|
||||
Reference in New Issue
Block a user