« get me outta code hell

content: generate{Album,Track,}ReferencingArtworksPage - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/page
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-11-19 09:22:42 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-11-19 09:22:42 -0400
commit1eee031a7e1b5eb1e2fd3d3fb7411bb7a8a841ef (patch)
tree309f70b712778e3b2469cc24cd78e956a2e8a5b8 /src/page
parentd2bc9d725c83ab8d6131598b7763c7e711f9697a (diff)
content: generate{Album,Track,}ReferencingArtworksPage
Diffstat (limited to 'src/page')
-rw-r--r--src/page/album.js10
-rw-r--r--src/page/track.js10
2 files changed, 20 insertions, 0 deletions
diff --git a/src/page/album.js b/src/page/album.js
index 76f3d6b0..be551ca7 100644
--- a/src/page/album.js
+++ b/src/page/album.js
@@ -50,6 +50,16 @@ export function pathsForTarget(album) {
       },
     },
 
+    !empty(album.referencedByArtworks) && {
+      type: 'page',
+      path: ['albumReferencingArtworks', album.directory],
+
+      contentFunction: {
+        name: 'generateAlbumReferencingArtworksPage',
+        args: [album],
+      },
+    },
+
     /*
     {
       type: 'data',
diff --git a/src/page/track.js b/src/page/track.js
index ea5d0dce..94a1e48d 100644
--- a/src/page/track.js
+++ b/src/page/track.js
@@ -29,5 +29,15 @@ export function pathsForTarget(track) {
         args: [track],
       },
     },
+
+    !empty(track.referencedByArtworks) && {
+      type: 'page',
+      path: ['trackReferencingArtworks', track.directory],
+
+      contentFunction: {
+        name: 'generateTrackReferencingArtworksPage',
+        args: [track],
+      },
+    },
   ];
 }