mirror of
https://github.com/pelican-plugins/share-post.git
synced 2025-10-15 17:08:54 +02:00
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 <xspager+dlemos@gmail.com>
This commit is contained in:
parent
376cc12df9
commit
35aec507f4
3 changed files with 9 additions and 1 deletions
3
RELEASE.md
Normal file
3
RELEASE.md
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
Release type: patch
|
||||||
|
|
||||||
|
Add title to Bluesky
|
||||||
|
|
@ -99,7 +99,7 @@ def create_link_linkedin(title, url, content):
|
||||||
@create_link
|
@create_link
|
||||||
def create_link_bluesky(title, url, content):
|
def create_link_bluesky(title, url, content):
|
||||||
# https://docs.bsky.app/docs/advanced-guides/intent-links
|
# 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):
|
def create_share_links(content):
|
||||||
|
|
|
||||||
|
|
@ -61,3 +61,8 @@ def test_share_post(tmp_folder):
|
||||||
share_links["reddit"]
|
share_links["reddit"]
|
||||||
== "https://www.reddit.com/submit?url=/test-post.html&title=Test%20post"
|
== "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"
|
||||||
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue