diff --git a/app/assets/images/social_icons/bluesky.svg b/app/assets/images/social_icons/bluesky.svg new file mode 100644 index 0000000000..7e7c880d7c --- /dev/null +++ b/app/assets/images/social_icons/bluesky.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/config/locales/en.yml b/config/locales/en.yml index 16bef0bd09..0e7946c0fa 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2632,6 +2632,9 @@ en: email: title: Share via Email alt: Email icon + bluesky: + title: Share via Bluesky + alt: Bluesky Icon facebook: title: Share via Facebook alt: Facebook Icon diff --git a/lib/social_share_button_helper.rb b/lib/social_share_button_helper.rb index fe47c6ca15..b45c7933a5 100644 --- a/lib/social_share_button_helper.rb +++ b/lib/social_share_button_helper.rb @@ -3,6 +3,7 @@ module SocialShareButtonHelper SOCIAL_SHARE_CONFIG = { :email => "social_icons/email.svg", + :bluesky => "social_icons/bluesky.svg", :facebook => "social_icons/facebook.svg", :linkedin => "social_icons/linkedin.svg", :mastodon => "social_icons/mastodon.svg", @@ -44,6 +45,8 @@ def self.generate_share_url(site, params) "https://mastodonshare.com/?text=#{URI.encode_www_form_component(params[:title])}&url=#{URI.encode_www_form_component(params[:url])}" when :telegram "https://t.me/share/url?url=#{URI.encode_www_form_component(params[:url])}&text=#{URI.encode_www_form_component(params[:title])}" + when :bluesky + "https://bsky.app/intent/compose?text=#{URI.encode_www_form_component(params[:title])}+#{URI.encode_www_form_component(params[:url])}" else raise ArgumentError, "Unsupported platform: #{platform}" end