blob: d23052294949ae032b0eecfe8ec6e4ae837e7d41 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 | export const description = `redirects for aliased artist names`;
export function targets({wikiData}) {
  return wikiData.artistAliasData;
}
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',
      fromPath: ['artist', aliasArtist.directory],
      toPath: ['artist', aliasedArtist.directory],
      title: aliasedArtist.name,
    },
  ];
}
 |