{%- macro add_comments(comment_system, automatic_loading) -%}
{% elif comment_system == "utterances" %} {# Store required utterances data attributes in the div #} data-repo="{{ config.extra.utterances.repo }}" {% if config.extra.utterances.issue_term == "slug" %} data-issue-term="{{ page.slug }}" {% else %} data-issue-term="{{ config.extra.utterances.issue_term }}" {% endif %} data-label="{{ config.extra.utterances.label }}" data-light-theme="{{ config.extra.utterances.light_theme }}" data-dark-theme="{{ config.extra.utterances.dark_theme }}" data-lazy-loading="{{ config.extra.utterances.lazy_loading | default(value=true) }}"> {% elif comment_system == "hyvortalk" %} {# Store required Hyvor Talk data attributes in the div #} data-website-id="{{ config.extra.hyvortalk.website_id }}" {% if config.extra.hyvortalk.page_id_is_slug %} data-page-id="{{ page.slug }}" {% else %} data-page-id="{{ current_url }}" {% endif %} {% if config.extra.hyvortalk.lang %} data-page-language="{{ config.extra.hyvortalk.lang }}" {% else %} data-page-language="{{ lang }}" {% endif %} data-page-author="{{ config.extra.hyvortalk.page_author }}" {% if config.extra.hyvortalk.lazy_loading %} data-loading="lazy"> {% else %} data-loading="default"> {% endif %} {% endif %} {% if automatic_loading %} {% else %} {% endif %}
{%- endmacro add_comments -%}