From 91cde73bb69944ec9ceabf8d23ce829df12dbb0a Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 26 Jan 2025 16:56:47 -0400 Subject: content: generateSocialEmbed: process image path --- src/content/dependencies/generateTrackSocialEmbed.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/content/dependencies/generateTrackSocialEmbed.js') diff --git a/src/content/dependencies/generateTrackSocialEmbed.js b/src/content/dependencies/generateTrackSocialEmbed.js index d8e21e38..7cb37af2 100644 --- a/src/content/dependencies/generateTrackSocialEmbed.js +++ b/src/content/dependencies/generateTrackSocialEmbed.js @@ -4,7 +4,7 @@ export default { 'generateTrackSocialEmbedDescription', ], - extraDependencies: ['absoluteTo', 'language', 'urls'], + extraDependencies: ['absoluteTo', 'language'], relations(relation, track) { return { @@ -39,7 +39,7 @@ export default { return data; }, - generate: (data, relations, {absoluteTo, language, urls}) => + generate: (data, relations, {absoluteTo, language}) => language.encapsulate('trackPage.socialEmbed', embedCapsule => relations.socialEmbed.slots({ title: @@ -60,15 +60,9 @@ export default { imagePath: (data.imageSource === 'album' - ? '/' + - urls - .from('shared.root') - .to('media.albumCover', data.albumDirectory, data.coverArtFileExtension) + ? ['media.albumCover', data.albumDirectory, data.coverArtFileExtension] : data.imageSource === 'track' - ? '/' + - urls - .from('shared.root') - .to('media.trackCover', data.albumDirectory, data.trackDirectory, data.coverArtFileExtension) + ? ['media.trackCover', data.albumDirectory, data.trackDirectory, data.coverArtFileExtension] : null), })), }; -- cgit 1.3.0-6-gf8a5