theme(fix): bring some logic into /disabled sharing

Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
This commit is contained in:
Patrick Kollitsch 2024-10-21 06:54:33 +07:00
parent 0aec28fef6
commit a9cd70d1e6
No known key found for this signature in database
GPG key ID: 5A5360B005AD68C7

View file

@ -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 -}}