From c40557ff32be217839b673e508cd60a7f2cf3359 Mon Sep 17 00:00:00 2001 From: Daniel Lemos Date: Sat, 22 Mar 2025 23:38:37 -0300 Subject: [PATCH] feat: Add title to bluesky --- pelican/plugins/share_post/share_post.py | 2 +- pelican/plugins/share_post/test_share_post.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pelican/plugins/share_post/share_post.py b/pelican/plugins/share_post/share_post.py index 6172904..2f829c1 100644 --- a/pelican/plugins/share_post/share_post.py +++ b/pelican/plugins/share_post/share_post.py @@ -99,7 +99,7 @@ def create_link_linkedin(title, url, content): @create_link def create_link_bluesky(title, url, content): # https://docs.bsky.app/docs/advanced-guides/intent-links - return f"https://bsky.app/intent/compose?text={url}" + return f"https://bsky.app/intent/compose?text={title}%20{url}" def create_share_links(content): diff --git a/pelican/plugins/share_post/test_share_post.py b/pelican/plugins/share_post/test_share_post.py index e973e70..acb23bd 100644 --- a/pelican/plugins/share_post/test_share_post.py +++ b/pelican/plugins/share_post/test_share_post.py @@ -61,3 +61,7 @@ def test_share_post(tmp_folder): share_links["reddit"] == "https://www.reddit.com/submit?url=/test-post.html&title=Test%20post" ) + + assert ( + share_links["bluesky"] == "https://bsky.app/intent/compose?text=Test%20post%20/test-post.html" + )