From 00f4261a6da00438576d8303ddae2f2bca4719bd Mon Sep 17 00:00:00 2001
From: Oliver Ladner
Date: Mon, 13 Jan 2025 12:37:23 +0100
Subject: [PATCH 1/3] 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
From 77e452d25e7fa5882b9102bd11c4299fa2bce36a Mon Sep 17 00:00:00 2001
From: Oliver Ladner
Date: Mon, 13 Jan 2025 15:59:17 +0100
Subject: [PATCH 2/3] docs: add Bluesky
---
README.md | 3 +++
1 file changed, 3 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:
Reddit
❄
Twitter
+ ❄
+ Bluesky
{% endif %}
From b63e466b36c65a430cd3bba1f9a0abce5f56edb5 Mon Sep 17 00:00:00 2001
From: Oliver Ladner
Date: Mon, 13 Jan 2025 15:59:52 +0100
Subject: [PATCH 3/3] style: move import to original location
---
pelican/plugins/share_post/share_post.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pelican/plugins/share_post/share_post.py b/pelican/plugins/share_post/share_post.py
index 2cbd815..6172904 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 = []