forked from github/share-post
Compare commits
3 commits
main
...
feature/bl
| Author | SHA1 | Date | |
|---|---|---|---|
| b63e466b36 | |||
| 77e452d25e | |||
| 00f4261a6d |
2 changed files with 9 additions and 0 deletions
|
|
@ -36,6 +36,7 @@ article.share_post = {
|
||||||
"mastodon": "<URL>",
|
"mastodon": "<URL>",
|
||||||
"reddit": "<URL>",
|
"reddit": "<URL>",
|
||||||
"twitter": "<URL>",
|
"twitter": "<URL>",
|
||||||
|
"bluesky": "<URL>",
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -61,6 +62,8 @@ You can then access those variables in your template. For example:
|
||||||
<a href="{{article.share_post['reddit']}}" title="Share via Reddit">Reddit</a>
|
<a href="{{article.share_post['reddit']}}" title="Share via Reddit">Reddit</a>
|
||||||
❄
|
❄
|
||||||
<a href="{{article.share_post['twitter']}}" title="Share on Twitter">Twitter</a>
|
<a href="{{article.share_post['twitter']}}" title="Share on Twitter">Twitter</a>
|
||||||
|
❄
|
||||||
|
<a href="{{article.share_post['bluesky']}}" title="Share on Bluesky">Bluesky</a>
|
||||||
</p>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
||||||
|
|
@ -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):
|
def create_share_links(content):
|
||||||
if isinstance(content, contents.Static):
|
if isinstance(content, contents.Static):
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue