Skip to content

Commit

Permalink
theme(fix): bring some logic into /disabled sharing
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Kollitsch <[email protected]>
  • Loading branch information
davidsneighbour committed Oct 20, 2024
1 parent 0aec28f commit a9cd70d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions layouts/partials/social/share.html
Original file line number Diff line number Diff line change
@@ -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 -}}
Expand Down Expand Up @@ -55,7 +59,7 @@
{{- end -}}
</div>

{{- end -}} {{/* if eq "true" $enabled */}}
{{- end -}} {{/* if eq "true" $disabled */}}

{{ define "partials/func/getShareLink.html" }}
{{- $context := .context -}}
Expand Down

1 comment on commit a9cd70d

@melroy89
Copy link
Contributor

@melroy89 melroy89 commented on a9cd70d Oct 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to disable a single social section? Eg. [params.ananke.social.github] I want to not list in the the share section, but only in the follow section..

I tried adding share = false, is not working. I also tried: disable_share = true is ALSO not working..

For some reason you include all ananke.social listings in the share section, this is not what people want! You can't share on Mastodon, or GitLab or GitHub. And still you list those items now in the share section..... And I'm unable to hide it.

Also .. the networks that I did mention in [params.ananke.social.share], doesn't seem to be applied.

Please sign in to comment.