From a51a129626653d6376d3afb1404e3bbc84ee2cfd Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 6 Feb 2024 09:59:58 -0400 Subject: content: gAIPCommentaryChunkedList: one line per commentary entry --- .../generateArtistInfoPageCommentaryChunkedList.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js b/src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js index 2892152e..41cb3017 100644 --- a/src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js +++ b/src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js @@ -19,10 +19,13 @@ export default { query(artist) { const processEntries = (things, details) => - things.map(thing => ({ - thing, - entry: details(thing), - })); + things.flatMap(thing => + thing.commentary + .filter(entry => entry.artists.includes(artist)) + .map(entry => ({ + thing, + entry: details(thing, entry), + }))); const albumEntries = processEntries( -- cgit 1.3.0-6-gf8a5