From 33e329de02d64181489fde515b9543e0ec08daec Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Thu, 31 Aug 2023 15:38:29 +0200 Subject: [PATCH] Document Mastodon functionality in README --- README.md | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index fce34cd..5871750 100644 --- a/README.md +++ b/README.md @@ -23,38 +23,41 @@ Usage This plugin adds to each Pelican article a dictionary of URLs that, when followed, allows the reader to easily share the article via specific channels. When activated, the plugin adds the attribute `share_post` to each article with the following format: -``` python +```python article.share_post = { - "facebook": "", "email": "", - "twitter": "", "diaspora": "", - "linkedin": "", + "facebook": "", "hacker-news": "", + "linkedin": "", + "mastodon": "", "reddit": "", + "twitter": "", } ``` You can then access those variables in your template. For example: -``` html+jinja +```html+jinja {% if article.share_post and article.status != 'draft' %}

Share on: - Diaspora* + Email ❄ - Twitter + DiasporaFacebook ❄ + Hacker News + ❄ LinkedIn ❄ - HackerNews - ❄ - Email + MastodonReddit + ❄ + Twitter

{% endif %}