« get me outta code hell

artist-alias.js « page « src - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/page/artist-alias.js
blob: 1da2af417eff1f4a1efa75fe0c97f6c9110a927b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
export const description = `redirects for aliased artist names`;

export function targets({wikiData}) {
  return wikiData.artistAliasData;
}

export function pathsForTarget(aliasArtist) {
  const {aliasedArtist} = aliasArtist;

  return [
    {
      type: 'redirect',
      fromPath: ['artist', aliasArtist.directory],
      toPath: ['artist', aliasedArtist.directory],
      title: aliasedArtist.name,
    },
  ];
}