« get me outta code hell

linkListing.js « dependencies « content « src - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/linkListing.js
blob: ac66919ab73972ea7c51fdca353a6dba90e1d7ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
export default {
  contentDependencies: ['linkThing'],
  extraDependencies: ['language'],

  relations: (relation, listing) =>
    ({link: relation('linkThing', 'localized.listing', listing)}),

  data: (listing) =>
    ({stringsKey: listing.stringsKey}),

  generate: (data, relations, {language}) =>
    relations.link
      .slot('content',
        language.$('listingPage', data.stringsKey, 'title')),
};