diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-08-10 10:54:41 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-08-10 10:54:41 -0300 |
commit | 84757d1e54f9cb8825b041368b55e01ba0d4b17b (patch) | |
tree | e4a7e3379c6a523762307e95a211300c5e42938a /src/content/dependencies/generateContributionList.js | |
parent | f49326e998f69931b52969c4235b0ee478ddc682 (diff) |
content: generateContributionList
Diffstat (limited to 'src/content/dependencies/generateContributionList.js')
-rw-r--r-- | src/content/dependencies/generateContributionList.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/content/dependencies/generateContributionList.js b/src/content/dependencies/generateContributionList.js new file mode 100644 index 0000000..731cfba --- /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, + })))), +}; |