From 7e8edc2e0bdee10127d8cb780ecfaebb6fa34240 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 4 Apr 2024 11:33:18 -0300 Subject: content: generateAlbumAdditionalFilesList: description as content --- .../dependencies/generateAlbumAdditionalFilesList.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/content/dependencies/generateAlbumAdditionalFilesList.js b/src/content/dependencies/generateAlbumAdditionalFilesList.js index b9269d74..77aac472 100644 --- a/src/content/dependencies/generateAlbumAdditionalFilesList.js +++ b/src/content/dependencies/generateAlbumAdditionalFilesList.js @@ -6,6 +6,7 @@ export default { 'generateAdditionalFilesListChunk', 'generateAdditionalFilesListChunkItem', 'linkAlbumAdditionalFile', + 'transformContent', ], extraDependencies: ['getSizeOfAdditionalFile', 'html', 'urls'], @@ -18,6 +19,13 @@ export default { additionalFiles .map(() => relation('generateAdditionalFilesListChunk')), + chunkDescriptions: + additionalFiles + .map(({description}) => + (description + ? relation('transformContent', description) + : null)), + chunkItems: additionalFiles .map(({files}) => @@ -38,10 +46,6 @@ export default { additionalFiles .map(({title}) => title), - chunkDescriptions: - additionalFiles - .map(({description}) => description ?? null), - chunkItemLocations: additionalFiles .map(({files}) => files ?? []), @@ -56,10 +60,13 @@ export default { chunks: stitchArrays({ chunk: relations.chunks, + description: relations.chunkDescriptions, title: data.chunkTitles, - description: data.chunkDescriptions, }).map(({chunk, title, description}) => - chunk.slots({title, description})), + chunk.slots({ + title, + description: description.slot('mode', 'inline'), + })), chunkItems: stitchArrays({ -- cgit 1.3.0-6-gf8a5