🚧 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

@@ -63,6 +63,13 @@
;
{%- for domain in config.extra.allowed_domains -%}
{{ domain.directive }} {{ domain.domains | join(sep=' ') }}
{# Automatically allow giscus/utterances, if enabled #}
{%- if domain.directive == "script-src" or domain.directive == "frame-src" or domain.directive == "style-src" -%}
{%- if config.extra.giscus.enabled_for_all_posts or page.extra.giscus %} giscus.app
{%- elif config.extra.utterances.enabled_for_all_posts or page.extra.utterances%} utteranc.es
{%- endif %}
{%- endif -%}
{%- if not loop.last -%}
;
{%- endif -%}