dotfiles

My PC Dotfiles & Website

comments.html (1327B)


{% macro comments() %} {% if config.extra.disqus.enabled or
config.extra.giscus.enabled %} {% if config.extra.disqus.enabled %}{% set thread
= "disqus_thread" %}{% else %}{% set thread = "giscus_thread" %}{% endif %}
<button
  type="button"
  class="comments-collapsible js-only"
  aria-expanded="false"
  aria-controls="comments-{{ thread }}">
  Show Comments
</button>
<div
  class="comments"
  id="comments-{{ thread }}"
  data-url="{{ page.permalink }}"
  hidden
  inert>
  <div class="comments-content" id="{{ thread }}">
    {% if config.extra.disqus.enabled %}
    <script
      type="text/plain"
      data-src="https://{{ config.extra.disqus.short_name }}.disqus.com/embed.js"></script>
    {% else %}
    <script
      type="text/plain"
      data-src="https://giscus.app/client.js"
      data-repo="{{ config.extra.giscus.repo }}"
      data-repo-id="{{ config.extra.giscus.repo_id }}"
      data-category="{{ config.extra.giscus.category }}"
      data-category-id="{{ config.extra.giscus.category_id }}"
      data-mapping="pathname"
      data-reactions-enabled="1"
      data-emit-metadata="0"
      data-input-position="top"
      data-theme="transparent_dark"
      data-lang="en"
      crossorigin="anonymous"></script>
    {% endif %}
  </div>
</div>
{{ js::comments() }} {% endif %} {% endmacro comments %}