From 8f39a21ef27f8b66cd49c01e38937d133f13859d Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 8 Aug 2023 11:03:25 -0300 Subject: content: move hard-coded redirects into page files --- src/page/group.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/page/group.js') 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'], + }, + ]; +} -- cgit 1.3.0-6-gf8a5 From f65bbab508cebdbaffd188366e983945d73abd4a Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 8 Aug 2023 11:44:41 -0300 Subject: content: dedicated arbitrary page URL key This fixes getPageSubdirectoryPrefix thinking we're deeper than we really are. --- src/page/group.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/page/group.js') diff --git a/src/page/group.js b/src/page/group.js index 8795e15b..e1ed4185 100644 --- a/src/page/group.js +++ b/src/page/group.js @@ -46,14 +46,14 @@ export function pathsTargetless({wikiData: {wikiInfo}}) { wikiInfo.canonicalBase === 'https://hsmusic.wiki/' && { type: 'redirect', - fromPath: ['path', 'albums/fandom/'], + fromPath: ['page', 'albums/fandom'], toPath: ['groupGallery', 'fandom'], }, wikiInfo.canonicalBase === 'https://hsmusic.wiki/' && { type: 'redirect', - fromPath: ['path', 'albums/official/'], + fromPath: ['page', 'albums/official'], toPath: ['groupGallery', 'official'], }, ]; -- cgit 1.3.0-6-gf8a5 From 725482638dcc96632c3a9cf2b885f4128c50a1c1 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 8 Aug 2023 11:46:44 -0300 Subject: write, content: restore & handle redirect titles properly --- src/page/group.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/page/group.js') diff --git a/src/page/group.js b/src/page/group.js index e1ed4185..fa6c1c97 100644 --- a/src/page/group.js +++ b/src/page/group.js @@ -48,6 +48,7 @@ export function pathsTargetless({wikiData: {wikiInfo}}) { type: 'redirect', fromPath: ['page', 'albums/fandom'], toPath: ['groupGallery', 'fandom'], + title: 'Fandom - Gallery', }, wikiInfo.canonicalBase === 'https://hsmusic.wiki/' && @@ -55,6 +56,7 @@ export function pathsTargetless({wikiData: {wikiInfo}}) { type: 'redirect', fromPath: ['page', 'albums/official'], toPath: ['groupGallery', 'official'], + title: 'Official - Gallery', }, ]; } -- cgit 1.3.0-6-gf8a5