🚧 feat: add utterances support

This commit is contained in:
welpo
2023-07-10 21:42:21 +02:00
parent b76f9bbf44
commit 93c8b577b8
7 changed files with 105 additions and 14 deletions

View File

@@ -81,6 +81,25 @@
</section>
</article>
{# giscus / utterances comments #}
{% if config.extra.giscus.enabled_for_all_posts or page.extra.giscus %}
{# TODO: HERE GOES GISCUS SUPPORT #}
{% elif config.extra.utterances.enabled_for_all_posts or page.extra.utterances %}
<div class="comments">
<script src="https://utteranc.es/client.js"
repo="{{ config.extra.utterances.repo }}"
issue-term="{{ config.extra.utterances.issue_term }}"
label="{{ config.extra.utterances.label }}"
theme="{{ config.extra.utterances.theme }}"
{%- if config.extra.utterances.lazy_loading -%}
data-loading="lazy"
{%- endif -%}
crossorigin="anonymous"
async>
</script>
</div>
{% endif %}
</main>
{% endmacro content %}