diff options
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 |
commit | 2b1ffaa9696d38ed96a857f00ae2af3c13e7b08c (patch) | |
tree | ff35cc67e121924de3593c85aa286a43b0593b2d /src/content/dependencies | |
parent | 34a1115df603aff44f354abe9f15d24d53f7a5ac (diff) |
content: linkListing: use listing title (from stringsKey) by default
Diffstat (limited to 'src/content/dependencies')
-rw-r--r-- | src/content/dependencies/linkListing.js | 8 |
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`)), }; |