From 35aec507f43f2c34d2ca4ff87d025797ae5708e3 Mon Sep 17 00:00:00 2001 From: Daniel Lemos Date: Sun, 23 Mar 2025 15:31:47 -0300 Subject: [PATCH 1/2] feat: Add title to bluesky (#34) * feat: Add title to bluesky * Add release file * Format to make the linter happy --------- Co-authored-by: Daniel Lemos --- RELEASE.md | 3 +++ pelican/plugins/share_post/share_post.py | 2 +- pelican/plugins/share_post/test_share_post.py | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 RELEASE.md diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..e9d0cdf --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,3 @@ +Release type: patch + +Add title to Bluesky \ No newline at end of file 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..5ff33f9 100644 --- a/pelican/plugins/share_post/test_share_post.py +++ b/pelican/plugins/share_post/test_share_post.py @@ -61,3 +61,8 @@ 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" + ) From 7b77fb814395107b65c52aaa8b0b82b116489a6e Mon Sep 17 00:00:00 2001 From: botpub <52496925+botpub@users.noreply.github.com> Date: Sun, 23 Mar 2025 18:33:10 +0000 Subject: [PATCH 2/2] Release Share Post 1.2.1 --- CHANGELOG.md | 8 ++++++++ RELEASE.md | 3 --- pyproject.toml | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 RELEASE.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 088f6f7..a7c7fc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ CHANGELOG ========= +1.2.1 - 2025-03-23 +------------------ + +Add title to Bluesky + +Contributed by [Daniel Lemos](https://github.com/xspager) via [PR #34](https://github.com/pelican-plugins/share-post/pull/34/) + + 1.2.0 - 2025-01-29 ------------------ diff --git a/RELEASE.md b/RELEASE.md deleted file mode 100644 index e9d0cdf..0000000 --- a/RELEASE.md +++ /dev/null @@ -1,3 +0,0 @@ -Release type: patch - -Add title to Bluesky \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 40ff79f..90ed39b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "pelican-share-post" -version = "1.2.0" +version = "1.2.1" description = "A Pelican plugin to create share URLs of article" authors = [{name = "Talha Mansoor", email = "talha131@gmail.com"}, {name = "Justin Mayer", email = "entroP@gmail.com"}] license = {text = "MIT"}