diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-08-09 09:44:34 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-08-09 09:44:34 -0300 |
commit | 360342696a7e29dbeb0d8b54228ba2c0ac3c162b (patch) | |
tree | 4110b7e2737954dbbe5c64ad7ddaed5eabaacb62 /src/content/dependencies/linkPathFromMedia.js | |
parent | c4b40f4b7fa7ef5439845538af22cc9076e4cb9c (diff) | |
parent | f9247a3a21abd26ae22d769d2da7d4ce6e99461d (diff) |
Merge branch 'data-steps' of github.com:hsmusic/hsmusic-wiki into data-steps
Diffstat (limited to 'src/content/dependencies/linkPathFromMedia.js')
-rw-r--r-- | src/content/dependencies/linkPathFromMedia.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/content/dependencies/linkPathFromMedia.js b/src/content/dependencies/linkPathFromMedia.js new file mode 100644 index 00000000..34a2b857 --- /dev/null +++ b/src/content/dependencies/linkPathFromMedia.js @@ -0,0 +1,13 @@ +export default { + contentDependencies: ['linkTemplate'], + + relations: (relation) => + ({link: relation('linkTemplate')}), + + data: (path) => + ({path}), + + generate: (data, relations) => + relations.link + .slot('path', ['media.path', data.path]), +}; |