mirror of
https://github.com/pelican-plugins/share-post.git
synced 2025-10-15 17:08:54 +02:00
parent
de3397633c
commit
13e2184d82
2 changed files with 5 additions and 10 deletions
13
README.md
13
README.md
|
|
@ -42,12 +42,11 @@ How to Use
|
||||||
`article.share_post`. Keys of the dictionary are as follows,
|
`article.share_post`. Keys of the dictionary are as follows,
|
||||||
|
|
||||||
1. `facebook`
|
1. `facebook`
|
||||||
2. `google-plus`
|
1. `email`
|
||||||
3. `email`
|
1. `twitter`
|
||||||
4. `twitter`
|
1. `diaspora`
|
||||||
5. `diaspora`
|
1. `linkedin`
|
||||||
6. `linkedin`
|
1. `hacker-news`
|
||||||
7. `hacker-news`
|
|
||||||
|
|
||||||
Template Example
|
Template Example
|
||||||
================
|
================
|
||||||
|
|
@ -63,8 +62,6 @@ Template Example
|
||||||
❄
|
❄
|
||||||
<a href="{{article.share_post['facebook']}}" target="_blank" title="Share on Facebook">Facebook</a>
|
<a href="{{article.share_post['facebook']}}" target="_blank" title="Share on Facebook">Facebook</a>
|
||||||
❄
|
❄
|
||||||
<a href="{{article.share_post['google-plus']}}" target="_blank" title="Share on Google Plus">Google+</a>
|
|
||||||
❄
|
|
||||||
<a href="{{article.share_post['linkedin']}}" target="_blank" title="Share on LinkedIn">LinkedIn</a>
|
<a href="{{article.share_post['linkedin']}}" target="_blank" title="Share on LinkedIn">LinkedIn</a>
|
||||||
❄
|
❄
|
||||||
<a href="{{article.share_post['hacker-news']}}" target="_blank" title="Share on HackerNews">HackerNews</a>
|
<a href="{{article.share_post['hacker-news']}}" target="_blank" title="Share on HackerNews">HackerNews</a>
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,6 @@ def share_post(content):
|
||||||
mail_link = 'mailto:?subject=%s&body=%s' % (title, url)
|
mail_link = 'mailto:?subject=%s&body=%s' % (title, url)
|
||||||
diaspora_link = 'https://sharetodiaspora.github.io/?title=%s&url=%s' % (title, url)
|
diaspora_link = 'https://sharetodiaspora.github.io/?title=%s&url=%s' % (title, url)
|
||||||
facebook_link = 'https://www.facebook.com/sharer/sharer.php?u=%s' % url
|
facebook_link = 'https://www.facebook.com/sharer/sharer.php?u=%s' % url
|
||||||
gplus_link = 'https://plus.google.com/share?url=%s' % url
|
|
||||||
twitter_link = 'https://twitter.com/intent/tweet?text=%s&url=%s%s%s' % (title, url, via, hastags)
|
twitter_link = 'https://twitter.com/intent/tweet?text=%s&url=%s%s%s' % (title, url, via, hastags)
|
||||||
hackernews_link = 'https://news.ycombinator.com/submitlink?t=%s&u=%s' % (title, url)
|
hackernews_link = 'https://news.ycombinator.com/submitlink?t=%s&u=%s' % (title, url)
|
||||||
linkedin_link = 'https://www.linkedin.com/shareArticle?mini=true&url=%s&title=%s&summary=%s&source=%s' % (
|
linkedin_link = 'https://www.linkedin.com/shareArticle?mini=true&url=%s&title=%s&summary=%s&source=%s' % (
|
||||||
|
|
@ -70,7 +69,6 @@ def share_post(content):
|
||||||
'diaspora' : diaspora_link,
|
'diaspora' : diaspora_link,
|
||||||
'twitter' : twitter_link,
|
'twitter' : twitter_link,
|
||||||
'facebook' : facebook_link,
|
'facebook' : facebook_link,
|
||||||
'google-plus': gplus_link,
|
|
||||||
'linkedin' : linkedin_link,
|
'linkedin' : linkedin_link,
|
||||||
'hacker-news': hackernews_link,
|
'hacker-news': hackernews_link,
|
||||||
'email' : mail_link
|
'email' : mail_link
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue