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",
when :linkedin
"https://www.linkedin.com/sharing/share-offsite/?url=#{URI.encode_www_form_component(params[:url])}"
when :facebook
- "https://www.facebook.com/sharer/sharer.php?u=#{URI.encode_www_form_component('params[:url]')}&t=#{URI.encode_www_form_component(params[:title])}"
+ "https://www.facebook.com/sharer/sharer.php?u=#{URI.encode_www_form_component(params[:url])}&t=#{URI.encode_www_form_component(params[:title])}"
when :mastodon
"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