feat: remove home page from other links

feat/integration_ideo
Nicolas Doby 2022-11-02 14:26:15 +01:00
parent 8d053a29d8
commit 11ce3ad871
2 changed files with 7 additions and 1 deletions

View File

@ -85,6 +85,12 @@ module.exports = function(eleventyConfig) {
return authors ? "par " + (authors || []).join(" & ") : ""; return authors ? "par " + (authors || []).join(" & ") : "";
}); });
eleventyConfig.addFilter("noHome", elements => {
return elements.filter(e => {
return e.url !== '/';
});
})
// Customize Markdown library and settings: // Customize Markdown library and settings:
eleventyConfig.amendLibrary("md", mdLib => { eleventyConfig.amendLibrary("md", mdLib => {
mdLib.use(markdownItAnchor, { mdLib.use(markdownItAnchor, {

View File

@ -1,6 +1,6 @@
<div class="title">Autres liens</div> <div class="title">Autres liens</div>
<ul class="links"> <ul class="links">
{%- for entry in collections.all | eleventyNavigation %} {%- for entry in collections.all | eleventyNavigation | noHome %}
<li><a <li><a
href="{{ entry.url }}">{{ entry.title }}</a></li> href="{{ entry.url }}">{{ entry.title }}</a></li>
{%- endfor %} {%- endfor %}