From 491663a71c5ed19237d8b21b68dabc6fcb0b3f79 Mon Sep 17 00:00:00 2001 From: weeheavy Date: Fri, 17 Jan 2025 15:23:14 +0100 Subject: [PATCH] feat: Bluesky support (#32) * feat: Bluesky support * docs: add Bluesky * style: move import to original location --- README.md | 3 +++ pelican/plugins/share_post/share_post.py | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index a1289af..8e26419 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ article.share_post = { "mastodon": "", "reddit": "", "twitter": "", + "bluesky": "", } ``` @@ -61,6 +62,8 @@ You can then access those variables in your template. For example: RedditTwitter + ❄ + Bluesky

{% endif %} diff --git a/pelican/plugins/share_post/share_post.py b/pelican/plugins/share_post/share_post.py index c27ad79..6172904 100644 --- a/pelican/plugins/share_post/share_post.py +++ b/pelican/plugins/share_post/share_post.py @@ -96,6 +96,12 @@ 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}" + + def create_share_links(content): if isinstance(content, contents.Static): return