diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-10-29 09:26:59 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-10-29 09:26:59 -0300 |
commit | bfa1953e79a562ee675940b7acc52b5b29d22d8f (patch) | |
tree | 5c1cd2f4050c801a60f4b65b367a714ed0979759 /src/page | |
parent | c4ef4ced62d659d217873c6c48dd8038dbf765af (diff) | |
parent | 940b2cbf8b68eb0b446cca0feeb507840c486394 (diff) |
Merge branch 'preview' into listing-tweaks
Diffstat (limited to 'src/page')
-rw-r--r-- | src/page/album.js | 3 | ||||
-rw-r--r-- | src/page/artist-alias.js | 6 | ||||
-rw-r--r-- | src/page/flash-act.js | 23 | ||||
-rw-r--r-- | src/page/flash.js | 2 | ||||
-rw-r--r-- | src/page/index.js | 1 |
5 files changed, 31 insertions, 4 deletions
diff --git a/src/page/album.js b/src/page/album.js index 69fcabcf..af410763 100644 --- a/src/page/album.js +++ b/src/page/album.js @@ -5,7 +5,6 @@ export function targets({wikiData}) { } export function pathsForTarget(album) { - const hasGalleryPage = album.tracks.some(t => t.hasUniqueCoverArt); const hasCommentaryPage = !!album.commentary || album.tracks.some(t => t.commentary); return [ @@ -19,7 +18,7 @@ export function pathsForTarget(album) { }, }, - hasGalleryPage && { + { type: 'page', path: ['albumGallery', album.directory], diff --git a/src/page/artist-alias.js b/src/page/artist-alias.js index 1da2af41..d2305229 100644 --- a/src/page/artist-alias.js +++ b/src/page/artist-alias.js @@ -7,6 +7,12 @@ export function targets({wikiData}) { export function pathsForTarget(aliasArtist) { const {aliasedArtist} = aliasArtist; + // Don't generate a redirect page if this aliased name resolves to the same + // directory as the original artist! See issue #280. + if (aliasArtist.directory === aliasedArtist.directory) { + return []; + } + return [ { type: 'redirect', diff --git a/src/page/flash-act.js b/src/page/flash-act.js new file mode 100644 index 00000000..e54525ae --- /dev/null +++ b/src/page/flash-act.js @@ -0,0 +1,23 @@ +export const description = `flash act gallery pages`; + +export function condition({wikiData}) { + return wikiData.wikiInfo.enableFlashesAndGames; +} + +export function targets({wikiData}) { + return wikiData.flashActData; +} + +export function pathsForTarget(flashAct) { + return [ + { + type: 'page', + path: ['flashActGallery', flashAct.directory], + + contentFunction: { + name: 'generateFlashActGalleryPage', + args: [flashAct], + }, + }, + ]; +} diff --git a/src/page/flash.js b/src/page/flash.js index b9d27d0f..7df74158 100644 --- a/src/page/flash.js +++ b/src/page/flash.js @@ -1,5 +1,3 @@ -import {empty} from '#sugar'; - export const description = `flash & game pages`; export function condition({wikiData}) { diff --git a/src/page/index.js b/src/page/index.js index 48e22d2e..21d93c8f 100644 --- a/src/page/index.js +++ b/src/page/index.js @@ -2,6 +2,7 @@ export * as album from './album.js'; export * as artist from './artist.js'; export * as artistAlias from './artist-alias.js'; export * as flash from './flash.js'; +export * as flashAct from './flash-act.js'; export * as group from './group.js'; export * as homepage from './homepage.js'; export * as listing from './listing.js'; |