From 07c9742601438a325349cfb051bc04c4df626291 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 4 Apr 2023 10:51:50 -0300 Subject: content: generateAlbumInfoPageContent: add listen links --- src/content/dependencies/generateAlbumInfoPageContent.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/content/dependencies/generateAlbumInfoPageContent.js b/src/content/dependencies/generateAlbumInfoPageContent.js index 7d99f40c..3d0fe9fc 100644 --- a/src/content/dependencies/generateAlbumInfoPageContent.js +++ b/src/content/dependencies/generateAlbumInfoPageContent.js @@ -8,6 +8,7 @@ export default { 'generateContentHeading', 'linkAlbumCommentary', 'linkAlbumGallery', + 'linkExternal', ], extraDependencies: [ @@ -50,6 +51,12 @@ export default { relation('linkAlbumCommentary', album); } + if (!empty(album.urls)) { + relations.externalLinks = + album.urls.map(url => + relation('linkExternal', url, {type: 'album'})); + } + if (!empty(album.additionalFiles)) { relations.additionalFilesShortcut = relation('generateAdditionalFilesShortcut', album.additionalFiles); @@ -169,6 +176,12 @@ export default { }), ]), + !empty(relations.externalLinks) && + html.tag('p', + language.$('releaseInfo.listenOn', { + links: language.formatDisjunctionList(relations.externalLinks), + })), + /* !empty(album.urls) && html.tag('p', -- cgit 1.3.0-6-gf8a5