diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-08-08 11:03:25 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-08-08 11:03:25 -0300 |
commit | 8f39a21ef27f8b66cd49c01e38937d133f13859d (patch) | |
tree | ddea7dc9c58c0b69c8f3957181f3d64c224df32b /src/page | |
parent | f2e6da9c339b9b4b862d9070188f4b0ba07baf45 (diff) |
content: move hard-coded redirects into page files
Diffstat (limited to 'src/page')
-rw-r--r-- | src/page/album.js | 11 | ||||
-rw-r--r-- | src/page/group.js | 18 |
2 files changed, 29 insertions, 0 deletions
diff --git a/src/page/album.js b/src/page/album.js index a8e0b591..1d5c7c0f 100644 --- a/src/page/album.js +++ b/src/page/album.js @@ -55,6 +55,17 @@ export function pathsForTarget(album) { ]; } +export function pathsTargetless({wikiData: {wikiInfo}}) { + return [ + wikiInfo.canonicalBase === 'https://hsmusic.wiki/' && + { + type: 'redirect', + fromPath: ['path', 'list/all-commentary/'], + toPath: ['commentaryIndex'], + }, + ]; +} + /* export function write(album, {wikiData}) { const getSocialEmbedDescription = ({ diff --git a/src/page/group.js b/src/page/group.js index 4d5f91c8..8795e15b 100644 --- a/src/page/group.js +++ b/src/page/group.js @@ -40,3 +40,21 @@ export function pathsForTarget(group) { }, ]; } + +export function pathsTargetless({wikiData: {wikiInfo}}) { + return [ + wikiInfo.canonicalBase === 'https://hsmusic.wiki/' && + { + type: 'redirect', + fromPath: ['path', 'albums/fandom/'], + toPath: ['groupGallery', 'fandom'], + }, + + wikiInfo.canonicalBase === 'https://hsmusic.wiki/' && + { + type: 'redirect', + fromPath: ['path', 'albums/official/'], + toPath: ['groupGallery', 'official'], + }, + ]; +} |