From 2b1ffaa9696d38ed96a857f00ae2af3c13e7b08c Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 1 Jul 2023 14:16:12 -0300 Subject: content: linkListing: use listing title (from stringsKey) by default --- src/content/dependencies/linkListing.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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`)), }; -- cgit 1.3.0-6-gf8a5