« get me outta code hell

content: linkListing: use listing title (from stringsKey) by default - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-07-01 14:16:12 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-07-01 14:16:12 -0300
commit2b1ffaa9696d38ed96a857f00ae2af3c13e7b08c (patch)
treeff35cc67e121924de3593c85aa286a43b0593b2d
parent34a1115df603aff44f354abe9f15d24d53f7a5ac (diff)
content: linkListing: use listing title (from stringsKey) by default
-rw-r--r--src/content/dependencies/linkListing.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/content/dependencies/linkListing.js b/src/content/dependencies/linkListing.js
index f27d93ac..2fc516bc 100644
--- a/src/content/dependencies/linkListing.js
+++ b/src/content/dependencies/linkListing.js
@@ -1,8 +1,14 @@
 export default {
   contentDependencies: ['linkThing'],
+  extraDependencies: ['language'],
 
   relations: (relation, listing) =>
     ({link: relation('linkThing', 'localized.listing', listing)}),
 
-  generate: (relations) => relations.link,
+  data: (listing) =>
+    ({stringsKey: listing.stringsKey}),
+
+  generate: (data, relations, {language}) =>
+    relations.link
+      .slot('content', language.$(`listingPage.${data.stringsKey}.title`)),
 };