forked from github/share-post
feat: Bluesky support
This commit is contained in:
parent
46ff6e0722
commit
00f4261a6d
1 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue