diff options
Diffstat (limited to 'src/content/dependencies/linkWikiHome.js')
-rw-r--r-- | src/content/dependencies/linkWikiHome.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/content/dependencies/linkWikiHome.js b/src/content/dependencies/linkWikiHome.js new file mode 100644 index 00000000..06ec6438 --- /dev/null +++ b/src/content/dependencies/linkWikiHome.js @@ -0,0 +1,20 @@ +export default { + contentDependencies: ['linkStationaryIndex'], + extraDependencies: ['wikiData'], + + sprawl({wikiInfo}) { + return {wikiShortName: wikiInfo.nameShort}; + }, + + relations: (relation) => + ({link: relation('linkTemplate')}), + + data: (sprawl) => + ({wikiShortName: sprawl.wikiShortName}), + + generate: (data, relations) => + relations.link.slots({ + path: ['home'], + content: data.wikiShortName, + }), +}; |