feat(iine): add like buttons (#550)

This commit is contained in:
2025-08-05 18:18:12 +07:00
parent 92c1b75480
commit 438c91d226
10 changed files with 123 additions and 2 deletions

View File

@@ -7,6 +7,9 @@ content="default-src 'self'
{%- set giscus_enabled = config.extra.giscus.enabled_for_all_posts or page.extra.giscus -%}
{%- set hyvortalk_enabled = config.extra.hyvortalk.enabled_for_all_posts or page.extra.hyvortalk -%}
{%- set isso_enabled = config.extra.isso.enabled_for_all_posts or page.extra.isso -%}
{%- if page -%}
{%- set iine_enabled = macros_settings::evaluate_setting_priority(setting="iine", page=page, default_global_value=false) == "true" -%}
{%- endif -%}
{%- if page -%}
{%- set mermaid_enabled = macros_settings::evaluate_setting_priority(setting="mermaid", page=page, default_global_value=false) == "true" -%}
{%- endif -%}
@@ -50,7 +53,7 @@ content="default-src 'self'
{%- set script_src = script_src ~ " " ~ " utteranc.es" -%}
{%- endif -%}
{%- if mermaid_enabled and not serve_local_mermaid -%}
{%- if (mermaid_enabled and not serve_local_mermaid) or iine_enabled -%}
{%- set script_src = script_src ~ " " ~ " cdn.jsdelivr.net" -%}
{%- endif -%}
@@ -59,6 +62,12 @@ content="default-src 'self'
{%- set connect_src = connect_src ~ " webmention.io" -%}
{%- endif -%}
{#- Check if iine like buttons are enabled to allow the necessary domains -#}
{%- if iine_enabled -%}
{%- set connect_src = connect_src ~ " vhiweeypifbwacashxjz.supabase.co" -%}
{%- endif -%}
{#- Append WebSocket for Zola serve mode -#}
{%- if config.mode == "serve" -%}
{%- set connect_src = connect_src ~ " ws:" -%}