From 00f4261a6da00438576d8303ddae2f2bca4719bd Mon Sep 17 00:00:00 2001 From: Oliver Ladner Date: Mon, 13 Jan 2025 12:37:23 +0100 Subject: [PATCH] feat: Bluesky support --- pelican/plugins/share_post/share_post.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pelican/plugins/share_post/share_post.py b/pelican/plugins/share_post/share_post.py index c27ad79..2cbd815 100644 --- a/pelican/plugins/share_post/share_post.py +++ b/pelican/plugins/share_post/share_post.py @@ -13,9 +13,9 @@ This plugin adds social share URLs to each article. from urllib.parse import quote from bs4 import BeautifulSoup +from pelican.generators import ArticlesGenerator, PagesGenerator from pelican import contents, signals -from pelican.generators import ArticlesGenerator, PagesGenerator _create_link_functions = [] @@ -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