diff options
Diffstat (limited to 'src/page')
-rw-r--r-- | src/page/artist.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/page/artist.js b/src/page/artist.js index ad365161..1e8dd907 100644 --- a/src/page/artist.js +++ b/src/page/artist.js @@ -2,6 +2,8 @@ // // NB: See artist-alias.js for artist alias redirect pages. +import {empty} from '../util/sugar.js'; + export const description = `per-artist info & artwork gallery pages`; export function targets({wikiData}) { @@ -9,6 +11,10 @@ export function targets({wikiData}) { } export function pathsForTarget(artist) { + const hasGalleryPage = + !empty(artist.tracksAsCoverArtist) || + !empty(artist.albumsAsCoverArtist); + return [ { type: 'page', @@ -19,5 +25,15 @@ export function pathsForTarget(artist) { args: [artist], }, }, + + hasGalleryPage && { + type: 'page', + path: ['artistGallery', artist.directory], + + contentFunction: { + name: 'generateArtistGalleryPage', + args: [artist], + }, + }, ]; } |