{% import "partials/language.html" as lang %} {% set toc_ = page.toc %} {% if toc_ | first is defined and "\x3ch1 id=" in page.content %} {% set toc_ = (toc_ | first).children %} {% endif %} {% if toc_ | first is defined %} {{ lang.t('toc.title') }} {% for toc_item in toc_ %} {% include "partials/toc-item.html" %} {% endfor %} {% if page.meta.source and page.meta.source | length > 0 %} {{ lang.t('meta.source') }} {% endif %} {% if config.extra.disqus and not page.is_homepage %} {{ lang.t('meta.comments') }} {% endif %} {% endif %}