Skip to main content

Social plugin for Pelican

https://secure.travis-ci.org/noirbizarre/pelican-social.svg?tag=0.2.0 https://coveralls.io/repos/noirbizarre/pelican-social/badge.svg?tag=0.2.0 https://img.shields.io/pypi/l/pelican-social.svg https://img.shields.io/pypi/pyversions/pelican-social.svg

Social directives for Pelican static blog generator.

Easy linking to social networks content through simple inline directives.

Compatibility

pelican-social is compatible with Pelican 3.3+ and Python 2.7.

Installation

Install the plugin via pip:

~$ pip install pelican-social

Usage

To load the plugin, you have to add it in your settings file.

PLUGINS = (
    'social',
)

Once loaded you have access to social rst directives.

Each directive can be called in two forms:

:network:`target`

:network:`Displayed text <target>`

As much as possible, the directive give a secure (https) link.

Twitter

You can use both :twitter: and :tw: directives to link to a Twitter profile, they are equivalent. Using an @ in username will only change the displayed username if a custom display is not specified.

Exemple:

:twitter:`username`
:twitter:`@username`
:twitter:`User <username>`
:twitter:`User <@username>`

will result in:

<a href="https://twitter.com/username">username</a>
<a href="https://twitter.com/username">&#64;username</a>
<a href="https://twitter.com/username">User</a>
<a href="https://twitter.com/username">User</a>

Google+

Google+ is tricky with usernames. If you are famous and lucky you can have a custom username in +MyUser form. If not you will have a 21 digits identifier.

Exemple:

:gplus:`username`
:gplus:`User <username>`

will result in:

<a href="https://plus.google.com/username">username</a>
<a href="https://plus.google.com/username">User</a>

Github

You can use both :github: and :gh: directive to link to github profiles, repositories and issues/pull-requests (github will autmatically redirect you to the pull-request if one is associated with the issue).

The following form are accepted:

Target

Expected target form

profile

username

repository

username/repository

issue/pull-request

username/repository#issue

Exemple:

:github:`username`
:github:`User <username>`
:github:`username/repository`
:github:`Repository <username/repository>`
:github:`username/repository#2`
:github:`Issue #2 <username/repository#2>`

will result in:

<a href="https://github.com/username">username</a>
<a href="https://github.com/username">User</a>
<a href="https://github.com/username/repository">repository</a>
<a href="https://github.com/username/repository">Repository</a>
<a href="https://github.com/username/repository/issues/2">#2</a>
<a href="https://github.com/username/repository/issues/2">Issue #2</a>

Facebook

You can use both :facebook: and :fb: directives to link to a Facebook profile, they are equivalent.

Exemple:

:facebook:`User <username>`
:facebook:`username`

will result in:

<a href="https://facebook.com/username">User</a>
<a href="https://facebook.com/username">username</a>

Changelog

0.2.0 (2017-02-02)

  • Support for Pelican 3.7+ and Python 3.3+

  • Drop support for Python 3.2

0.1.1 (2013-07-02)

  • Handle dot and dashes in Github usernames and repository names

0.1 (2013-06-20)

  • Initial implementation allowing to link to:
    • Facebook profiles

    • Twitter profiles

    • Google+ profiles

    • Github profiles, repositories and issues

Release files for pelican-social 0.2.0

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

Built distribution (wheel)

Table of built distributions (wheels) for pelican-social 0.2.0
File Interpreter ABI Platform
pelican_social-0.2.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Release files / pelican_social-0.2.0-py2.py3-none-any.whl

Download URL pelican_social-0.2.0-py2.py3-none-any.whl
Size 9.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
fd65a79200f0a1dea2303dde691794715bab1e1af7515b778640fc0e5d520aaa
BLAKE2b-256 checksum
How to use checksums
4f1cb43f3d131c104e92fca29fe80075f5049376c6c0793248930c2b3efba74c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.0 This release

1 release file

0.1.1

1 release file

0.1

1 release file

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