Skip to main content

Share Post: A Plugin for Pelican

Build Status PyPI Version License

Share Post is a Pelican plugin that creates share links in articles that allow site visitors to share the current article with others in a privacy-friendly manner.

Many web sites have share widgets to let readers share posts on social networks. Most of these widgets are used by vendors for online tracking. These widgets can also be visually-distracting and negatively affect readers’ attention.

Share Post creates old-school URLs for some popular sites which your theme can use. These links do not have the ability to track site visitors. They can also be unobtrusive depending on how Pelican theme uses them.

Installation

This plugin can be installed via:

python -m pip install pelican-share-post

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:

article.share_post = {
	"facebook": "<URL>",
	"email": "<URL>",
	"twitter": "<URL>",
	"diaspora": "<URL>",
	"linkedin": "<URL>",
	"hacker-news": "<URL>",
	"reddit": "<URL>",
}

You can then access those variables in your template. For example:

{% if article.share_post and article.status != 'draft' %}
<section>
  <p id="post-share-links">
    Share on:
    <a href="{{article.share_post['diaspora']}}" title="Share on Diaspora">Diaspora*</a><a href="{{article.share_post['twitter']}}" title="Share on Twitter">Twitter</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 HackerNews">HackerNews</a><a href="{{article.share_post['email']}}" title="Share via Email">Email</a><a href="{{article.share_post['reddit']}}" title="Share via Reddit">Reddit</a>
  </p>
</section>
{% endif %}

Contributing

Contributions are welcome and much appreciated. Every little bit helps. You can contribute by improving the documentation, adding missing features, and fixing bugs. You can also help out by reviewing and commenting on existing issues.

To start contributing to this plugin, review the Contributing to Pelican documentation, beginning with the Contributing Code section.

Contributors

License

This project is licensed under the MIT license.

Release files for pelican-share-post 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pelican-share-post 1.0.0
File Size Uploaded
pelican-share-post-1.0.0.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pelican-share-post 1.0.0
File Interpreter ABI Platform
pelican_share_post-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size:11.4 kB

Release files / pelican-share-post-1.0.0.tar.gz

Download URL pelican-share-post-1.0.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a013e27e783d44598b75e1027337f132d33074da08c12b87d2200e1d0b5a8c58
BLAKE2b-256 checksum
How to use checksums
2e5e927cd13e8762b4fbede27d76ca4e34803bc5e79cba1a483e89d9916f8daa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.5 CPython/3.9.2 Linux/5.4.0-1040-azure

Release files / pelican_share_post-1.0.0-py3-none-any.whl

Download URL pelican_share_post-1.0.0-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f583580145938f45551c494005a92c03677df0069e6e8b6bb8f54253740b4fb
BLAKE2b-256 checksum
How to use checksums
43dd4231d67c26264232e02da1134551aa3d9e00475c867adce54fa842e56093
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.5 CPython/3.9.2 Linux/5.4.0-1040-azure

Release history Release notifications | RSS feed

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page