pelican-share-post


Namepelican-share-post JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/pelican-plugins/share-post
SummaryA Pelican plugin to create share URLs of article
upload_time2023-08-31 13:45:29
maintainer
docs_urlNone
authorTalha Mansoor
requires_python>=3.7,<4.0
licenseMIT
keywords pelican plugin social
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Share Post: A Plugin for Pelican

[![Build Status](https://img.shields.io/github/actions/workflow/status/pelican-plugins/share-post/main.yml?branch=main)](https://github.com/pelican-plugins/share-post/actions)
[![PyPI Version](https://img.shields.io/pypi/v/pelican-share-post)](https://pypi.org/project/pelican-share-post/)
![License](https://img.shields.io/pypi/l/pelican-share-post?color=blue)

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:

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

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

```html+jinja
{% 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>
  </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.

[existing issues]: https://github.com/pelican-plugins/share-post/issues
[Contributing to Pelican]: https://docs.getpelican.com/en/latest/contribute.html


Contributors
------------

* [Talha Mansoor](https://www.oncrashreboot.com) - talha131@gmail.com
* [Jonathan DEKHTIAR](https://github.com/DEKHTIARJonathan) - contact@jonathandekhtiar.eu
* [Justin Mayer](https://justinmayer.com)
* [Leonardo Giordani](https://github.com/lgiordani)
* [Maurizio Paglia](https://github.com/mpaglia0)


License
-------

This project is licensed under the MIT license.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pelican-plugins/share-post",
    "name": "pelican-share-post",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "pelican,plugin,social",
    "author": "Talha Mansoor",
    "author_email": "talha131@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/3c/3b/6ca30e93049320575cea13e76299a3c75c9ac50a6721c43b181d883a5544/pelican_share_post-1.1.0.tar.gz",
    "platform": null,
    "description": "# Share Post: A Plugin for Pelican\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/pelican-plugins/share-post/main.yml?branch=main)](https://github.com/pelican-plugins/share-post/actions)\n[![PyPI Version](https://img.shields.io/pypi/v/pelican-share-post)](https://pypi.org/project/pelican-share-post/)\n![License](https://img.shields.io/pypi/l/pelican-share-post?color=blue)\n\nShare 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.\n\nMany 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\u2019 attention.\n\nShare 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.\n\n\nInstallation\n------------\n\nThis plugin can be installed via:\n\n    python -m pip install pelican-share-post\n\nUsage\n-----\n\nThis 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:\n\n```python\narticle.share_post = {\n\t\"email\": \"<URL>\",\n\t\"diaspora\": \"<URL>\",\n\t\"facebook\": \"<URL>\",\n\t\"hacker-news\": \"<URL>\",\n\t\"linkedin\": \"<URL>\",\n\t\"mastodon\": \"<URL>\",\n\t\"reddit\": \"<URL>\",\n\t\"twitter\": \"<URL>\",\n}\n```\n\nYou can then access those variables in your template. For example:\n\n```html+jinja\n{% if article.share_post and article.status != 'draft' %}\n<section>\n  <p id=\"post-share-links\">\n    Share on:\n    <a href=\"{{article.share_post['email']}}\" title=\"Share via Email\">Email</a>\n    \u2744\n    <a href=\"{{article.share_post['diaspora']}}\" title=\"Share on Diaspora\">Diaspora</a>\n    \u2744\n    <a href=\"{{article.share_post['facebook']}}\" title=\"Share on Facebook\">Facebook</a>\n    \u2744\n    <a href=\"{{article.share_post['hacker-news']}}\" title=\"Share on Hacker News\">Hacker News</a>\n    \u2744\n    <a href=\"{{article.share_post['linkedin']}}\" title=\"Share on LinkedIn\">LinkedIn</a>\n    \u2744\n    <a href=\"{{article.share_post['mastodon]}}\" title=\"Share on Mastodon\">Mastodon</a>\n    \u2744\n    <a href=\"{{article.share_post['reddit']}}\" title=\"Share via Reddit\">Reddit</a>\n    \u2744\n    <a href=\"{{article.share_post['twitter']}}\" title=\"Share on Twitter\">Twitter</a>\n  </p>\n</section>\n{% endif %}\n```\n\nContributing\n------------\n\nContributions 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][].\n\nTo start contributing to this plugin, review the [Contributing to Pelican][] documentation, beginning with the **Contributing Code** section.\n\n[existing issues]: https://github.com/pelican-plugins/share-post/issues\n[Contributing to Pelican]: https://docs.getpelican.com/en/latest/contribute.html\n\n\nContributors\n------------\n\n* [Talha Mansoor](https://www.oncrashreboot.com) - talha131@gmail.com\n* [Jonathan DEKHTIAR](https://github.com/DEKHTIARJonathan) - contact@jonathandekhtiar.eu\n* [Justin Mayer](https://justinmayer.com)\n* [Leonardo Giordani](https://github.com/lgiordani)\n* [Maurizio Paglia](https://github.com/mpaglia0)\n\n\nLicense\n-------\n\nThis project is licensed under the MIT license.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Pelican plugin to create share URLs of article",
    "version": "1.1.0",
    "project_urls": {
        "Documentation": "https://docs.getpelican.com",
        "Funding": "https://donate.getpelican.com/",
        "Homepage": "https://github.com/pelican-plugins/share-post",
        "Issue Tracker": "https://github.com/pelican-plugins/share-post/issues",
        "Repository": "https://github.com/pelican-plugins/share-post"
    },
    "split_keywords": [
        "pelican",
        "plugin",
        "social"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "46ef0910172593af2cd9c873e92800391b6c53e68ae2c957050449f459eb3ba3",
                "md5": "58d08ce00af6320a2e105da1bdf2ac4b",
                "sha256": "75eab648bb26f3aa549cac70d5564e89507543c76452b02b63034c62fb3f44b2"
            },
            "downloads": -1,
            "filename": "pelican_share_post-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "58d08ce00af6320a2e105da1bdf2ac4b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 6012,
            "upload_time": "2023-08-31T13:45:27",
            "upload_time_iso_8601": "2023-08-31T13:45:27.384248Z",
            "url": "https://files.pythonhosted.org/packages/46/ef/0910172593af2cd9c873e92800391b6c53e68ae2c957050449f459eb3ba3/pelican_share_post-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3c3b6ca30e93049320575cea13e76299a3c75c9ac50a6721c43b181d883a5544",
                "md5": "42265f6c80b12a1ba8e9fbe12cedcb06",
                "sha256": "cfbe9fab73b92a8bd06a1cc5c015652c2fd52208adfea6728a3611a5612c8f67"
            },
            "downloads": -1,
            "filename": "pelican_share_post-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "42265f6c80b12a1ba8e9fbe12cedcb06",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 5055,
            "upload_time": "2023-08-31T13:45:29",
            "upload_time_iso_8601": "2023-08-31T13:45:29.716488Z",
            "url": "https://files.pythonhosted.org/packages/3c/3b/6ca30e93049320575cea13e76299a3c75c9ac50a6721c43b181d883a5544/pelican_share_post-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-31 13:45:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pelican-plugins",
    "github_project": "share-post",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "pelican-share-post"
}
        
Elapsed time: 0.10661s