mirror of
https://github.com/pelican-plugins/share-post.git
synced 2025-10-15 17:08:54 +02:00
share_post: add share-to-Diaspora* support
This uses the sharetodiaspora.github.io HTML5 posting app, necessary due to Diaspora*'s multi-homed nature.
This commit is contained in:
parent
f510f7f9e6
commit
bf5a1ecc6b
2 changed files with 6 additions and 1 deletions
|
|
@ -51,6 +51,8 @@ Template Example
|
|||
<section>
|
||||
<p id="post-share-links">
|
||||
Share on:
|
||||
<a href="{{article.share_post['diaspora']}}" target="_blank" title="Share on Diaspora">Diaspora*</a>
|
||||
❄
|
||||
<a href="{{article.share_post['twitter']}}" target="_blank" title="Share on Twitter">Twitter</a>
|
||||
❄
|
||||
<a href="{{article.share_post['facebook']}}" target="_blank" title="Share on Facebook">Facebook</a>
|
||||
|
|
|
|||
|
|
@ -39,12 +39,15 @@ def share_post(content):
|
|||
summary = article_summary(content)
|
||||
|
||||
tweet = ('%s%s%s' % (title, quote(' '), url)).encode('utf-8')
|
||||
diaspora_link = 'https://sharetodiaspora.github.io/?title=%s&url=%s' % (title, url)
|
||||
facebook_link = 'http://www.facebook.com/sharer/sharer.php?s=100&p%%5Burl%%5D=%s' % url
|
||||
gplus_link = 'https://plus.google.com/share?url=%s' % url
|
||||
twitter_link = 'http://twitter.com/home?status=%s' % tweet
|
||||
mail_link = 'mailto:?subject=%s&body=%s' % (title, url)
|
||||
|
||||
share_links = {'twitter': twitter_link,
|
||||
share_links = {
|
||||
'diaspora': diaspora_link,
|
||||
'twitter': twitter_link,
|
||||
'facebook': facebook_link,
|
||||
'google-plus': gplus_link,
|
||||
'email': mail_link
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue