Skip to main content

Share Post: A Plugin for Pelican

Build Status PyPI Version Downloads 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

As long as you have not explicitly added a PLUGINS setting to your Pelican settings file, then the newly-installed plugin should be automatically detected and enabled. Otherwise, you must add share_post to your existing PLUGINS list. For more information, please see the How to Use Plugins documentation.

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 = {
	"email": "<URL>",
	"diaspora": "<URL>",
	"facebook": "<URL>",
	"hacker-news": "<URL>",
	"linkedin": "<URL>",
	"mastodon": "<URL>",
	"reddit": "<URL>",
	"twitter": "<URL>",
	"bluesky": "<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['email']}}" title="Share via Email">Email</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['hacker-news']}}" title="Share on Hacker News">Hacker News</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['twitter']}}" title="Share on Twitter">Twitter</a><a href="{{article.share_post['bluesky']}}" title="Share on Bluesky">Bluesky</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.2.1

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.2.1
File Size Uploaded
pelican_share_post-1.2.1.tar.gz 5.3 kB Details

Built distribution (wheel)

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

Total release size: 11.6 kB

Release files / pelican_share_post-1.2.1.tar.gz

Download URL pelican_share_post-1.2.1.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f6dc774ba2527f8a10e8c27dcf8d63d05515b94e05eca7dc7a647e2683a6be3d
BLAKE2b-256 checksum
How to use checksums
0cc2ff54225243bb001c1a0d82bc953f6219a5698286f3dcc9680666ef735c0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 23, 2025.

Transparency log

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

Download URL pelican_share_post-1.2.1-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc299140bb66e0fac23b4e907e8be161b678c6dd81cabc582c74479f2cd33efb
BLAKE2b-256 checksum
How to use checksums
427d1ce09fa82d59f32e516e0b148946a3840d2984d693520ae8368d3e0773f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 23, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

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