mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig.space.git
synced 2025-12-13 16:26:50 +00:00
Category fixes
This commit is contained in:
@@ -47,6 +47,7 @@ const parseEpisode = e => {
|
||||
) || [, , , title]
|
||||
if (!number) categoryName = 'Verschiedenes'
|
||||
if (categoryName === 'Der-Weg') categoryName = 'Der Weg'
|
||||
if (categoryName === 'On-Tour') categoryName = 'On Tour'
|
||||
if (categoryName === 'Buchclub') categoryName = 'Lesestunde'
|
||||
const firstLine = description.split('\n')[0]
|
||||
const blockMatch = firstLine.match(/Blockzeit\s(\d+)/)
|
||||
@@ -55,7 +56,7 @@ const parseEpisode = e => {
|
||||
const slug = slugify(`${categoryName} ${number || ''} ${titlePlain}`)
|
||||
const date = new Date(e.pubDate)
|
||||
const img = e['itunes:image'].__attr.href
|
||||
const image = ['interview', 'lesestunde', 'verschiedenes'].includes(category)
|
||||
const image = ['interview', 'lesestunde', 'on-tour', 'verschiedenes'].includes(category)
|
||||
? img
|
||||
: `/img/cover/${category}.png`
|
||||
const duration = e['itunes:duration']
|
||||
|
||||
@@ -53,5 +53,6 @@ renderPage('category', 'podcast/news', { navCurrent: 'podcast', category: 'news'
|
||||
renderPage('category', 'podcast/interviews', { navCurrent: 'podcast', category: 'interview', categoryName: 'Interviews', episodes: episodes.filter(e => e.category === 'interview') })
|
||||
renderPage('category', 'podcast/lesestunde', { navCurrent: 'podcast', category: 'lesestunde', categoryName: 'Lesestunde', episodes: episodes.filter(e => e.category === 'lesestunde') })
|
||||
renderPage('category', 'podcast/der-weg', { navCurrent: 'podcast', category: 'der-weg', categoryName: 'Der Weg', episodes: episodes.filter(e => e.category === 'der-weg') })
|
||||
renderPage('category', 'podcast/on-tour', { navCurrent: 'podcast', category: 'on-tour', categoryName: 'On Tour', episodes: episodes.filter(e => e.category === 'on-tour') })
|
||||
renderPage('category', 'podcast/verschiedenes', { navCurrent: 'podcast', category: 'verschiedenes', categoryName: 'Verschiedenes', episodes: episodes.filter(e => e.category === 'verschiedenes') })
|
||||
episodes.forEach(episode => renderPage('episode', `podcast/${episode.slug}`, { navCurrent: 'podcast', episode, team }))
|
||||
|
||||
Reference in New Issue
Block a user