Display and link participants

This commit is contained in:
Dennis Reimann
2021-09-20 15:54:33 +02:00
parent d8f64e6ff8
commit 809bd1e941
4 changed files with 19 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ const config = require('../pug.config')
const site = require('../generated/site-data.json')
const episodes = require('../generated/episodes.json')
const spenden = require('../generated/spenden.json')
const participants = require('../generated/participants.json')
const team = require('../content/team.json')
const crew = require('../content/crew.json')
const meetups = require('../content/meetups.json')
@@ -36,4 +37,4 @@ renderPage('category', 'podcast/interviews', { navCurrent: 'podcast', category:
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/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 }))
episodes.forEach(episode => renderPage('episode', `podcast/${episode.slug}`, { navCurrent: 'podcast', episode, participants }))

View File

@@ -3,6 +3,8 @@ const { basename, join, resolve } = require('path')
const request = require('sync-request')
const meta = require('../content/meta.json')
const team = require('../content/team.json')
const crew = require('../content/crew.json')
const soundboard = require('../content/soundboard.json')
const dir = (...path) => resolve(__dirname, '..', ...path)
@@ -21,6 +23,10 @@ const date = (new Date()).toJSON().split('T')[0]
writeJSON(dir('generated', 'site-data.json'), { date, block, meta })
// Participants
const participants = team.concat(crew).reduce((result, person) => Object.assign(result, { [person.name]: person }), {})
writeJSON(dir('generated', 'participants.json'), participants)
// Soundboard
const sounds = soundboard.map(group => {
group.sounds = group.sounds.map(sound => {