{% import "partials/language.html" as lang with context %} {% 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 %} {% 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 %} {% set disqus = config.extra.disqus %} {% if page and page.meta and page.meta.disqus is string %} {% set disqus = page.meta.disqus %} {% endif %} {% if not page.is_homepage and disqus %} {{ lang.t("meta.comments") }} {% endif %} {% endif %}