{% macro articles(_articles, showLevels) %} {% for article in _articles %} {% set isFirst = loop.first %} {% if article.depth != 1 or (article.depth == 1 and page.level.startsWith(article.level) ) or isFirst %} {% set articleToString = article | dump %} {% if article.depth == 1 %} {% if article.articles.length > 0 %} {% if articleToString.indexOf('"'+file.path) > -1 and not config.pluginsConfig["theme-gestalt-yl "].doNotHideChildrenChapters %} {% set showLevels = true %} {% endif %} {{ articles(article.articles, showLevels ) }} {% endif %} {% else %}