From a9cd70d1e6b0dbec55c9ee8597add754a0a68893 Mon Sep 17 00:00:00 2001
From: Patrick Kollitsch <patrick@davids-neighbour.com>
Date: Sun, 20 Oct 2024 23:54:33 +0000
Subject: [PATCH] theme(fix): bring some logic into /disabled sharing

---
 layouts/partials/social/share.html |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/layouts/partials/social/share.html b/layouts/partials/social/share.html
index 31a8112..56054cc 100644
--- a/layouts/partials/social/share.html
+++ b/layouts/partials/social/share.html
@@ -1,7 +1,11 @@
 {{- $context := . -}}
-{{- $enabled := $context.Params.disable_share | default "true" -}}
+{{- $disabled := $context.Params.disable_share | default "false" -}}
+{{- $config := site.Params.ananke.social -}}
+{{- with $config.share.disable_share -}}
+  {{- $disabled := . -}}
+{{- end -}}
 
-{{- if eq "true" $enabled -}}
+{{- if eq "false" $disabled -}}
 
   {{- $title := $context.Title -}}
   {{- $url := printf "%s" $context.Permalink | absLangURL -}}
@@ -55,7 +59,7 @@
     {{- end -}}
   </div>
 
-{{- end -}} {{/* if eq "true" $enabled */}}
+{{- end -}} {{/* if eq "true" $disabled */}}
 
 {{ define "partials/func/getShareLink.html" }}
   {{- $context := .context -}}

--
Gitblit v1.10.0