Document Mastodon functionality in README

This commit is contained in:
Justin Mayer 2023-08-31 15:38:29 +02:00
commit 33e329de02

View file

@ -25,13 +25,14 @@ This plugin adds to each Pelican article a dictionary of URLs that, when followe
```python ```python
article.share_post = { article.share_post = {
"facebook": "<URL>",
"email": "<URL>", "email": "<URL>",
"twitter": "<URL>",
"diaspora": "<URL>", "diaspora": "<URL>",
"linkedin": "<URL>", "facebook": "<URL>",
"hacker-news": "<URL>", "hacker-news": "<URL>",
"linkedin": "<URL>",
"mastodon": "<URL>",
"reddit": "<URL>", "reddit": "<URL>",
"twitter": "<URL>",
} }
``` ```
@ -42,19 +43,21 @@ You can then access those variables in your template. For example:
<section> <section>
<p id="post-share-links"> <p id="post-share-links">
Share on: Share on:
<a href="{{article.share_post['diaspora']}}" title="Share on Diaspora">Diaspora*</a> <a href="{{article.share_post['email']}}" title="Share via Email">Email</a>
<a href="{{article.share_post['twitter']}}" title="Share on Twitter">Twitter</a> <a href="{{article.share_post['diaspora']}}" title="Share on Diaspora">Diaspora</a>
<a href="{{article.share_post['facebook']}}" title="Share on Facebook">Facebook</a> <a href="{{article.share_post['facebook']}}" title="Share on Facebook">Facebook</a>
<a href="{{article.share_post['linkedin']}}" title="Share on LinkedIn">LinkedIn</a>
<a href="{{article.share_post['hacker-news']}}" title="Share on Hacker News">Hacker News</a> <a href="{{article.share_post['hacker-news']}}" title="Share on Hacker News">Hacker News</a>
<a href="{{article.share_post['email']}}" title="Share via Email">Email</a> <a href="{{article.share_post['linkedin']}}" title="Share on LinkedIn">LinkedIn</a>
<a href="{{article.share_post['mastodon]}}" title="Share on Mastodon">Mastodon</a>
<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>
</p> </p>
</section> </section>
{% endif %} {% endif %}