mirror of
https://github.com/pelican-plugins/share-post.git
synced 2025-10-15 17:08:54 +02:00
add share-to-linkedin support
This commit is contained in:
parent
bf5a1ecc6b
commit
d9a96f1b9b
1 changed files with 7 additions and 0 deletions
|
|
@ -43,6 +43,10 @@ def share_post(content):
|
||||||
facebook_link = 'http://www.facebook.com/sharer/sharer.php?s=100&p%%5Burl%%5D=%s' % 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
|
gplus_link = 'https://plus.google.com/share?url=%s' % url
|
||||||
twitter_link = 'http://twitter.com/home?status=%s' % tweet
|
twitter_link = 'http://twitter.com/home?status=%s' % tweet
|
||||||
|
linkedin_link = 'https://www.linkedin.com/shareArticle?mini=true&url=%s&title=%s&summary=%s&source=%s' % (
|
||||||
|
url, title, summary, url
|
||||||
|
)
|
||||||
|
|
||||||
mail_link = 'mailto:?subject=%s&body=%s' % (title, url)
|
mail_link = 'mailto:?subject=%s&body=%s' % (title, url)
|
||||||
|
|
||||||
share_links = {
|
share_links = {
|
||||||
|
|
@ -50,6 +54,7 @@ def share_post(content):
|
||||||
'twitter': twitter_link,
|
'twitter': twitter_link,
|
||||||
'facebook': facebook_link,
|
'facebook': facebook_link,
|
||||||
'google-plus': gplus_link,
|
'google-plus': gplus_link,
|
||||||
|
'linkedin': linkedin_link,
|
||||||
'email': mail_link
|
'email': mail_link
|
||||||
}
|
}
|
||||||
content.share_post = share_links
|
content.share_post = share_links
|
||||||
|
|
@ -57,3 +62,5 @@ def share_post(content):
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
signals.content_object_init.connect(share_post)
|
signals.content_object_init.connect(share_post)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue