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/album.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/page/album.js') 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 = ({ -- cgit 1.3.0-6-gf8a5 From 4236b4f348e14be2b78496c8d1c1c60942aa3515 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 8 Aug 2023 11:21:46 -0300 Subject: content: generateCommentaryIndexPage --- src/page/album.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/page/album.js') diff --git a/src/page/album.js b/src/page/album.js index 1d5c7c0f..edde73a8 100644 --- a/src/page/album.js +++ b/src/page/album.js @@ -57,6 +57,12 @@ export function pathsForTarget(album) { export function pathsTargetless({wikiData: {wikiInfo}}) { return [ + { + type: 'page', + path: ['commentaryIndex'], + contentFunction: {name: 'generateCommentaryIndexPage'}, + }, + wikiInfo.canonicalBase === 'https://hsmusic.wiki/' && { type: 'redirect', -- 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/album.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/page/album.js') diff --git a/src/page/album.js b/src/page/album.js index edde73a8..4ed5bcb1 100644 --- a/src/page/album.js +++ b/src/page/album.js @@ -66,7 +66,7 @@ export function pathsTargetless({wikiData: {wikiInfo}}) { wikiInfo.canonicalBase === 'https://hsmusic.wiki/' && { type: 'redirect', - fromPath: ['path', 'list/all-commentary/'], + fromPath: ['page', 'list/all-commentary'], toPath: ['commentaryIndex'], }, ]; -- 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/album.js | 1 + 1 file changed, 1 insertion(+) (limited to 'src/page/album.js') diff --git a/src/page/album.js b/src/page/album.js index 4ed5bcb1..3b2d02d2 100644 --- a/src/page/album.js +++ b/src/page/album.js @@ -68,6 +68,7 @@ export function pathsTargetless({wikiData: {wikiInfo}}) { type: 'redirect', fromPath: ['page', 'list/all-commentary'], toPath: ['commentaryIndex'], + title: 'Album Commentary', }, ]; } -- cgit 1.3.0-6-gf8a5