diff --git a/layouts/podcast.11ty.js b/layouts/podcast.11ty.js index 50a36d4..356c9ea 100644 --- a/layouts/podcast.11ty.js +++ b/layouts/podcast.11ty.js @@ -44,7 +44,7 @@ class PodcastFeed { }, itunesExplicit: data.itunes?.explicit || false, itunesCategory: [], - itunesImage: data.itunes?.image || data.site.imageUrl || `${data.site.url}${data.page.filePathStem}.jpg` + itunesImage: data.itunes?.image || data.site.imageUrl || `${data.site.url}${data.page.filePathStem}.jpg`, }); const items = data.collections[data.episodeCollection]?.filter(episode=>episode.data.podcast!=false) @@ -59,7 +59,9 @@ class PodcastFeed { guid: episode.url, // optional - defaults to url date: episode.data.date, // any format that js Date can parse. enclosure : {url:`${episode.data.podcast.enclosureUrl}`}, // optional enclosure - customElements: [] + customElements: [], + itunesSeason: episode.data.season, + itunesEpisode: episode.data.episode // itunesDuration: duration, } if (episode.data.podcast.transcriptUrl) { @@ -69,6 +71,14 @@ class PodcastFeed { language:"en-us" }} }) + if (episode.data.season && episode.data.episode) { + item.customElements.push({ + 'podcast:season': episode.data.season, + }) + item.customElements.push({ + 'podcast:episode': episode.data.episode, + }) + } console.log() } item = feed.addItem(item);