diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-04-04 10:51:50 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-04-04 10:51:50 -0300 |
commit | 07c9742601438a325349cfb051bc04c4df626291 (patch) | |
tree | bc9ac54a6ca7584b466be826ae34f61b34fc8a29 | |
parent | dc573f90bd818531c474c241543f1d3532adaf91 (diff) |
content: generateAlbumInfoPageContent: add listen links
-rw-r--r-- | src/content/dependencies/generateAlbumInfoPageContent.js | 13 |
1 files changed, 13 insertions, 0 deletions
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', |