Skip to content

Commit 7f4a4b7

Browse files
authored
Add support for modern social share platforms. (#15959)
1 parent 3728702 commit 7f4a4b7

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

themes/devopsdays-theme/layouts/partials/footer_scripts.html

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@
7676
{{- $share_str = "\"facebook\"" -}}
7777
{{- else if eq $current_item "linkedin" -}}
7878
{{- $share_str = "\"linkedin\"" -}}
79+
{{- else if eq $current_item "bluesky" -}}
80+
{{- $share_str = "\"bluesky\"" -}}
81+
{{- else if eq $current_item "threads" -}}
82+
{{- $share_str = "\"threads\"" -}}
83+
{{- else if eq $current_item "mastodon" -}}
84+
{{- $share_str = "\"mastodon\"" -}}
7985
{{- else -}}
8086
{{- $twitter_share_val := index $current_item "share" -}}
8187
{{- if $twitter_share_val -}}
@@ -98,7 +104,21 @@
98104

99105
<script>
100106
//shares
101-
107+
jsSocials.shares.bluesky = {
108+
label: "Share",
109+
logo: "fa-brands fa-bluesky",
110+
shareUrl: "https://bsky.app/intent/compose?text={text} {url}"
111+
};
112+
jsSocials.shares.threads = {
113+
label: "Share",
114+
logo: "fa-brands fa-threads",
115+
shareUrl: "https://threads.net/intent/post?text={text} {url}"
116+
};
117+
jsSocials.shares.mastodon = {
118+
label: "Share",
119+
logo: "fa-brands fa-mastodon",
120+
shareUrl: "https://mastodonshare.com/?text={text}&url={url}"
121+
};
102122

103123
{{ $full_script | safeJS }}
104124

0 commit comments

Comments
 (0)