diff --git a/.eleventy.js b/.eleventy.js index 25f8c61f..6443a5d1 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -60,6 +60,13 @@ module.exports = function(config) { class: 'tool', text: '' } + ], + [ + 'warning', + { + class: 'warning', + text: 'Content warning' + } ] ]); diff --git a/11ty/_includes/components/table-of-content-item.njk b/11ty/_includes/components/table-of-content-item.njk index f9136784..7d20b6fb 100644 --- a/11ty/_includes/components/table-of-content-item.njk +++ b/11ty/_includes/components/table-of-content-item.njk @@ -5,6 +5,11 @@ definition.data.flag.text and (definition.data.flag.level == 'avoid') -%} {{ definition.data.flag.text }} + {%- elseif + definition.data.flag and + definition.data.flag.text and + (definition.data.flag.level == 'warning') -%} + {{ definition.data.flag.text }} {% endif %} {%- if definition.data.sub_terms -%}