Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions packages/starpod/src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,16 @@ import 'virtual:starpod/user-css';
const show = await getShowInfo();
// The palette's people: the explorer's With filter choices. The show's first
// two hosts wear their transcript voices' colours, as on the About posters.
// Only built pages gather them: an on-demand page such as the 404 would fetch
// the feed and query the database on every request, so its palette starts
// with episodes instead.
const hostNames = starpodConfig.hosts.map((host) => host.name);
const people = (await loadPeople()).map((person) => {
const voice = hostNames.indexOf(person.label);
return voice === 0 || voice === 1 ? { ...person, voice } : person;
});
const people = Astro.isPrerendered
? (await loadPeople()).map((person) => {
const voice = hostNames.indexOf(person.label);
return voice === 0 || voice === 1 ? { ...person, voice } : person;
})
: [];

export interface Props {
/**
Expand Down
Loading