diff --git a/.eleventy.js b/.eleventy.js index 0c0e491..869a91c 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -74,6 +74,28 @@ module.exports = function(config) { .slice(0, site.maxProfilePreview) ; }); + config.addCollection("tagsList", function(collectionApi) { + const tagsList = new Set(); + collectionApi.getAll().map( item => { + if (item.data.tags) { // handle pages that don't have tags + item.data.tags.map( tag => tagsList.add(tag)) + } + }); + return tagsList; + }); + config.addCollection("skillsList", function(collectionApi) { + const skillsList = new Set(); + collectionApi.getFilteredByGlob("./src/members/*.md").map( item => { + if (item.data.tags) { // handle pages that don't have skills + item.data.tags.map( skill => { // exclude non related tags + if (['post', 'news', 'event'].indexOf(skill) == -1) { + skillsList.add(skill) + } + }) + } + }); + return skillsList; + }); config.addCollection('customers', collection => { return [...collection.getFilteredByGlob("./src/customers/*.md")] .reverse() diff --git a/src/_includes/layouts/member.njk b/src/_includes/layouts/member.njk index 44ed7f7..d8c7d97 100644 --- a/src/_includes/layouts/member.njk +++ b/src/_includes/layouts/member.njk @@ -29,9 +29,22 @@ {% if socialLinkedin %} {% endif %} +