From f34a6baadda3ba87cc482aee34ecb256879730c5 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 5 Feb 2025 16:08:05 -0400 Subject: page: use path conditions --- src/page/artist.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/page/artist.js') diff --git a/src/page/artist.js b/src/page/artist.js index b68cf05c..257e060d 100644 --- a/src/page/artist.js +++ b/src/page/artist.js @@ -8,10 +8,6 @@ export function targets({wikiData}) { } export function pathsForTarget(artist) { - const hasGalleryPage = - !empty(artist.albumCoverArtistContributions) || - !empty(artist.trackCoverArtistContributions); - return [ { type: 'page', @@ -23,10 +19,14 @@ export function pathsForTarget(artist) { }, }, - hasGalleryPage && { + { type: 'page', path: ['artistGallery', artist.directory], + condition: () => + !empty(artist.albumCoverArtistContributions) || + !empty(artist.trackCoverArtistContributions), + contentFunction: { name: 'generateArtistGalleryPage', args: [artist], -- cgit 1.3.0-6-gf8a5