« get me outta code hell

tag.js « page « src - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/page/tag.js
blob: 8942aea9b4d8437d2d1bd461f36d5a65cf8c8dde (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
25
// Art tag page specification.

export const description = `per-artwork-tag gallery pages`;

export function condition({wikiData}) {
  return wikiData.wikiInfo.enableArtTagUI;
}

export function targets({wikiData}) {
  return wikiData.artTagData.filter((tag) => !tag.isContentWarning);
}

export function pathsForTarget(tag) {
  return [
    {
      type: 'page',
      path: ['tag', tag.directory],

      contentFunction: {
        name: 'generateArtTagGalleryPage',
        args: [tag],
      },
    },
  ];
}