From 6d8fe82b5386af536ca96eb1d89150e201c603e9 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 25 May 2023 13:23:04 -0300 Subject: content: sprawl & transformContent Sprawling basically means tying a component to objects which aren't directly passed to it. This is necessary for functions like transformContent, which was *mostly* implemented here (the multiline/lyrics modes are stubs, and a number of links haven't been implemented yet). --- src/content/dependencies/linkNewsEntry.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/content/dependencies/linkNewsEntry.js (limited to 'src/content/dependencies/linkNewsEntry.js') diff --git a/src/content/dependencies/linkNewsEntry.js b/src/content/dependencies/linkNewsEntry.js new file mode 100644 index 00000000..1fb32dd9 --- /dev/null +++ b/src/content/dependencies/linkNewsEntry.js @@ -0,0 +1,8 @@ +export default { + contentDependencies: ['linkThing'], + + relations: (relation, newsEntry) => + ({link: relation('linkThing', 'localized.newsEntry', newsEntry)}), + + generate: (relations) => relations.link, +}; -- cgit 1.3.0-6-gf8a5