« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content
diff options
context:
space:
mode:
Diffstat (limited to 'src/content')
-rw-r--r--src/content/dependencies/generateAlbumInfoPageContent.js13
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',