From 2192424367e56aa6cf0674722811a0d21dccd3ca Mon Sep 17 00:00:00 2001 From: Chris Chinchilla Date: Wed, 10 Jul 2024 11:35:38 +0200 Subject: [PATCH] Fix title and URL creation --- src/pages/podcast/whiskywordswit/[...slug].astro | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/podcast/whiskywordswit/[...slug].astro b/src/pages/podcast/whiskywordswit/[...slug].astro index 578548ec..3a223afa 100644 --- a/src/pages/podcast/whiskywordswit/[...slug].astro +++ b/src/pages/podcast/whiskywordswit/[...slug].astro @@ -35,24 +35,24 @@ export async function getStaticPaths() { removeNSPrefix: true, }; const parser = new XMLParser(options); - const feedTest = await fetch('https://feeds.simplecast.com/whlwDbyc'); + const feedTest = await fetch('https://anchor.fm/s/ef311c90/podcast/rss'); let rssFeedData = await feedTest.text(); let parsedFeed = await parser.parse(rssFeedData); const allEpisodes = parsedFeed.rss.channel.item; return await Promise.all( allEpisodes.map(async (episode) => { - const additionalData = await getEntry('podcasts', slugify(episode.title[0])); + const additionalData = await getEntry('podcasts', slugify(episode.title)); // TODO: Is this the optimal way? if (additionalData) { let episodeData = additionalData.data; return { - params: { slug: slugify(episode.title[0]) }, + params: { slug: slugify(episode.title) }, props: { episode, episodeData }, }; } else { return { - params: { slug: slugify(episode.title[0]) }, + params: { slug: slugify(episode.title) }, props: { episode }, }; }