« get me outta code hell

content: generateArtTagGalleryPage: reading links - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-10-09 14:59:33 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-02-25 20:03:26 -0400
commit7315e62bee168c2934e9a34388844abb8b627cc1 (patch)
treed6b1e92c744b873df7eea0c51358d7262caf0874
parent9dad55f40a8465fe9732f6d00b2d1fe8aff61bd5 (diff)
content: generateArtTagGalleryPage: reading links
-rw-r--r--src/content/dependencies/generateArtTagGalleryPage.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/content/dependencies/generateArtTagGalleryPage.js b/src/content/dependencies/generateArtTagGalleryPage.js
index a67e40e6..95d9469a 100644
--- a/src/content/dependencies/generateArtTagGalleryPage.js
+++ b/src/content/dependencies/generateArtTagGalleryPage.js
@@ -10,6 +10,7 @@ export default {
     'image',
     'linkAlbum',
     'linkArtTagGallery',
+    'linkExternal',
     'linkTrack',
   ],
 
@@ -46,6 +47,12 @@ export default {
     relations.quickDescription =
       relation('generateQuickDescription', artTag);
 
+    if (!empty(artTag.extraReadingURLs)) {
+      relations.extraReadingLinks =
+        artTag.extraReadingURLs
+          .map(url => relation('linkExternal', url));
+    }
+
     if (!empty(artTag.directAncestorArtTags)) {
       relations.ancestorLinks =
         artTag.directAncestorArtTags
@@ -123,7 +130,9 @@ export default {
 
         mainClasses: ['top-index'],
         mainContent: [
-          relations.quickDescription,
+          relations.quickDescription.slots({
+            extraReadingLinks: relations.extraReadingLinks ?? null,
+          }),
 
           html.tag('p', {class: 'quick-info'},
             language.encapsulate(pageCapsule, 'infoLine', capsule =>