diff --git a/.eleventy.js b/.eleventy.js index 84c27b8..b4fa81d 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -36,6 +36,15 @@ module.exports = config => { return [...collection.getFilteredByGlob('./src/posts/*.md')].reverse(); }); + // Return all the tags used in a collection + config.addFilter("getAllTags", collection => { + let tagSet = new Set(); + for(let item of collection) { + (item.data.tags || []).forEach(tag => tagSet.add(tag)); + } + return Array.from(tagSet); + }); + return { markdownTemplateEngine: 'njk', dataTemplateEngine: 'njk', diff --git a/src/_data/Term.json b/src/_data/Term.json index 91e67d3..a46e36c 100644 --- a/src/_data/Term.json +++ b/src/_data/Term.json @@ -3,6 +3,15 @@ "SkipLink": "Skip to content", "ToggleTheme": "Toggle theme", "TopLink": "Back to top", + "Listing": { + "Tags": { + "Title": "Tagged", + "More": { + "See": "See", + "All": "all tags" + } + } + }, "Footer": { "lastDeployment": "Dernier déploiement le", "createdWith": "Built with" diff --git a/src/_data/navigation.json b/src/_data/navigation.json index 174630b..42b930a 100644 --- a/src/_data/navigation.json +++ b/src/_data/navigation.json @@ -7,6 +7,14 @@ { "text": "About", "url": "/about/" + }, + { + "text": "Blog", + "url": "/blog/" + }, + { + "text": "Demo", + "url": "/tags/demo/" } ] } diff --git a/src/_includes/partials/article-head.html b/src/_includes/partials/article-head.html index c2505c5..5140ec7 100644 --- a/src/_includes/partials/article-head.html +++ b/src/_includes/partials/article-head.html @@ -12,7 +12,7 @@ {% if tags %} {% for tag in tags %}
{{ blog.data.leading }}
- {%- endif -%} -{{ Term.Site.Listing.Tags.More.See }} {{ Term.Site.Listing.Tags.More.All }}.
\ No newline at end of file