From 112a840bdf69bfba5aae893e92b0b20c4a4884fd Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 2 Jul 2025 17:43:34 -0300 Subject: data, content: singles --- src/page/album.js | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'src/page') diff --git a/src/page/album.js b/src/page/album.js index 696e2854..e585618c 100644 --- a/src/page/album.js +++ b/src/page/album.js @@ -8,15 +8,22 @@ export function targets({wikiData}) { export function pathsForTarget(album) { return [ - { - type: 'page', - path: ['album', album.directory], - - contentFunction: { - name: 'generateAlbumInfoPage', - args: [album], - }, - }, + (album.style === 'single' + ? { + type: 'redirect', + fromPath: ['album', album.directory], + toPath: ['track', album.tracks[0].directory], + title: album.name, + } + : { + type: 'page', + path: ['album', album.directory], + + contentFunction: { + name: 'generateAlbumInfoPage', + args: [album], + }, + }), { type: 'page', -- cgit 1.3.0-6-gf8a5