From 701ceaa964962d16486dda2489313dff1f323769 Mon Sep 17 00:00:00 2001 From: Oscar Date: Fri, 15 Nov 2019 20:13:29 +0100 Subject: [PATCH] feat(11ty): move table of content in partial file --- .../_includes/components/table-of-content.njk | 24 +++++++++++++++++ 11ty/_includes/layouts/base.njk | 26 +------------------ 2 files changed, 25 insertions(+), 25 deletions(-) create mode 100644 11ty/_includes/components/table-of-content.njk diff --git a/11ty/_includes/components/table-of-content.njk b/11ty/_includes/components/table-of-content.njk new file mode 100644 index 00000000..0b6870fb --- /dev/null +++ b/11ty/_includes/components/table-of-content.njk @@ -0,0 +1,24 @@ +
+ +
diff --git a/11ty/_includes/layouts/base.njk b/11ty/_includes/layouts/base.njk index 399ae025..ede5fc6b 100644 --- a/11ty/_includes/layouts/base.njk +++ b/11ty/_includes/layouts/base.njk @@ -21,31 +21,7 @@
{{ content | safe }} -
-

Table of Content

-
-
    - {% for definition in collections.definitions %} - {% set renderedName %} - {{ definition.data.title}} - {%- if definition.data.flag and (definition.data.flag.level == 'avoid') -%} - {{ definition.data.flag.type }} - {% endif %} - {% endset %} -
  • - {%- if definition.data.defined -%} - {{ renderedName | safe }} - {%- else -%} - {{ renderedName | safe }} - {% endif %} -
  • - {% endfor %} -
-
-
+ {% include 'components/table-of-content.njk' %}

Words

{% include 'components/defintions-list.njk' %}