Skip to content

Commit

Permalink
theme(fix): remove caching of share links (#757)
Browse files Browse the repository at this point in the history
You can't just cache the share links, that will result into every blog
post having the same URL.

Just use `partial` on the getShareLink.html. So now each post will show
the correct URL to share the post via social media or alike.

---------

Signed-off-by: Melroy van den Berg <melroy@melroy.org>
Signed-off-by: Patrick Kollitsch <83281+davidsneighbour@users.noreply.github.com>
Co-authored-by: Patrick Kollitsch <83281+davidsneighbour@users.noreply.github.com>
  • Loading branch information
melroy89 and davidsneighbour authored Oct 24, 2024
1 parent 1bcc471 commit 473c7c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/social/share.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
{{- continue -}}
{{/* @todo notification into CLI that a network is configured but not supported */}}
{{- end -}}
{{- $options := (dict "context" $context "setup" $setup) }}
{{- $href := partialCached "func/social/getShareLink.html" $options $options -}}
{{- $options := (dict "context" page "setup" $setup) }}
{{- $href := partial "func/social/getShareLink.html" $options -}}
<a href="{{ $href }}"
class="ananke-social-link {{ $setup.slug }} no-underline"
title="{{ $label }}" aria-label="{{ $label }}"
Expand Down

0 comments on commit 473c7c1

Please sign in to comment.