« get me outta code hell

linkPathFromMedia.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/linkPathFromMedia.js
blob: 34a2b8571a050943530ad496d1eff9e41794306b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
export default {
  contentDependencies: ['linkTemplate'],

  relations: (relation) =>
    ({link: relation('linkTemplate')}),

  data: (path) =>
    ({path}),

  generate: (data, relations) =>
    relations.link
      .slot('path', ['media.path', data.path]),
};