{% set discussion = not page.meta.discussion is defined or page.meta.discussion == true %}
{% if not page.meta.generated and discussion and config.extra.giscus %}

  <!-- Giscus -->
  <h2 id="__comments">{{ lang.t("meta.comments") }}</h2>
  {% if page and page.meta and page.meta.rule %}
    {% set discus_term = page.meta.rule %}
  {% endif %}

  {% if discus_term %}
    <script src="https://giscus.app/client.js"
      data-repo="{{ config.extra.giscus.repo }}"
      data-repo-id="{{ config.extra.giscus.repo