Skip to content

Commit 491663a

Browse files
authored
feat: Bluesky support (#32)
* feat: Bluesky support * docs: add Bluesky * style: move import to original location
1 parent 46ff6e0 commit 491663a

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ article.share_post = {
3636
"mastodon": "<URL>",
3737
"reddit": "<URL>",
3838
"twitter": "<URL>",
39+
"bluesky": "<URL>",
3940
}
4041
```
4142

@@ -61,6 +62,8 @@ You can then access those variables in your template. For example:
6162
<a href="{{article.share_post['reddit']}}" title="Share via Reddit">Reddit</a>
6263
6364
<a href="{{article.share_post['twitter']}}" title="Share on Twitter">Twitter</a>
65+
66+
<a href="{{article.share_post['bluesky']}}" title="Share on Bluesky">Bluesky</a>
6467
</p>
6568
</section>
6669
{% endif %}

pelican/plugins/share_post/share_post.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ def create_link_linkedin(title, url, content):
9696
)
9797

9898

99+
@create_link
100+
def create_link_bluesky(title, url, content):
101+
# https://docs.bsky.app/docs/advanced-guides/intent-links
102+
return f"https://bsky.app/intent/compose?text={url}"
103+
104+
99105
def create_share_links(content):
100106
if isinstance(content, contents.Static):
101107
return

0 commit comments

Comments
 (0)