From 84757d1e54f9cb8825b041368b55e01ba0d4b17b Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 10 Aug 2023 10:54:41 -0300 Subject: content: generateContributionList --- src/content/dependencies/generateContributionList.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/content/dependencies/generateContributionList.js (limited to 'src/content/dependencies/generateContributionList.js') diff --git a/src/content/dependencies/generateContributionList.js b/src/content/dependencies/generateContributionList.js new file mode 100644 index 00000000..731cfba5 --- /dev/null +++ b/src/content/dependencies/generateContributionList.js @@ -0,0 +1,20 @@ +export default { + contentDependencies: ['linkContribution'], + extraDependencies: ['html'], + + relations: (relation, contributions) => + ({contributionLinks: + contributions + .map(contrib => relation('linkContribution', contrib))}), + + generate: (relations, {html}) => + html.tag('ul', + relations.contributionLinks.map(contributionLink => + html.tag('li', + contributionLink + .slots({ + showIcons: true, + showContribution: true, + preventWrapping: false, + })))), +}; -- cgit 1.3.0-6-gf8a5