From eed25c1a94ea6a1fd4dab6f1f88261a99a06a43c Mon Sep 17 00:00:00 2001 From: Helen Chong <119173961+helenclx@users.noreply.github.com> Date: Mon, 9 Dec 2024 12:51:58 +0800 Subject: [PATCH] Add option to add table of contents to link group tabs --- src/_includes/main/links.njk | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/_includes/main/links.njk b/src/_includes/main/links.njk index 8bfd415c..cd0fbf24 100644 --- a/src/_includes/main/links.njk +++ b/src/_includes/main/links.njk @@ -25,16 +25,21 @@ isContentDivided: true
-{% for group in linkGroups %} + {% for group in linkGroups %}
- {% headingAnchor 2 %} - {{ group.data.title }} - {% endheadingAnchor %} + {% headingAnchor 2 %}{{ group.data.title }}{% endheadingAnchor %} + + {% if group.data.toc %} +

Table of Contents

+ {{ group.templateContent | toc | safe }} + {% endif %} + {{ group.templateContent | safe }} - {% if group.data.updated %} + {% if group.data.updated %}

(This {{ group.data.title }} list was last updated on )

- {% endif %} + {% endif %} + Back to tabs
{%- endfor %}