From bd87753d76333943ad317df5c2976dbd08b52879 Mon Sep 17 00:00:00 2001 From: Sylvain Lafay Date: Thu, 15 Feb 2024 11:22:21 +0100 Subject: [PATCH] fix title, DSFR-ise tables in md files, fix filter --- content/fr/personal-data/index.md | 2 +- eleventy.config.js | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/content/fr/personal-data/index.md b/content/fr/personal-data/index.md index eef5a70..f729d00 100644 --- a/content/fr/personal-data/index.md +++ b/content/fr/personal-data/index.md @@ -1,5 +1,5 @@ --- -title: Exemple +title: Données personnelles layout: layouts/page.njk description: A compléter slugOverride: donnees personnelles diff --git a/eleventy.config.js b/eleventy.config.js index 5edbedd..b27d6b3 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -135,7 +135,7 @@ module.exports = function (eleventyConfig) { }); eleventyConfig.addFilter("filterTagList", function filterTagList(tags, addTags = []) { - return (tags || []).filter(tag => ["all", "nav", "post", "posts", "event"] + return (tags || []).filter(tag => ["all", "nav", "post", "posts", "events"] .concat(addTags) .indexOf(tag) === -1); }); @@ -158,6 +158,12 @@ module.exports = function (eleventyConfig) { }); }); + eleventyConfig.amendLibrary("md", mdLib => { + mdLib.renderer.rules.table_open = function(tokens, idx) { + return ''; + }; + }); + eleventyConfig.amendLibrary("md", mdLib => { mdLib.use(markdownItAttrs); });