Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Tweetable quotes for Python-Markdown.

Project Description
# Tweetable quotes for Python-Markdown

Why this extension? A lot of blog posts have social sharing buttons at the top or bottom of a page. But there is a recent trend to embed shareable quotes right into the post body, which noticeably increases content sharing. Some sites even allow you to select any part of text and share it (see []( for example). The basic idea is that people prefer to quote a story rather than its headline. And you can have multiple shareable quotes in a single story!

With this extension you will be able to turn the text below:

[tweetable url=""]
When there is state there can be no freedom,
but when there is freedom there will be no state.
-- Vladimir Lenin

into the following nice styled quote:

![Screenshot of the quote](/screenshot.png)

## Installation

pip install markdown-tweetable


pip install git+git://

## Usage

Full syntax:

[tweetable alt="When there is state there can be no freedom,
but when there is freedom there will be no state"
When there is state there can be no freedom, but when there is freedom there will be no state.
-- Vladimir Lenin

Default share buttons are rendered using [Font Awesome]( To use it you need to include the following CSS file before your `</head>` tag:

<link href="//" rel="stylesheet">

There are also more advanced ways to use it, go read the [documentation]( if you are curious.

If you plan to use Google+ button, you need to include the following JavaScript just before your `</body>` tag:

<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = '';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);

Also you need oAuth 2.0 client ID, as described in the [documentation]( To inject it, [specify]( `gcid` configuration parameter when initializing class instance:

TweetableExtension(configs={'gcid': ''})

Also you probably want to add some style. Below is an example:

blockquote.tweetable {
border-top: 1px solid #CCC;
border-bottom: 1px solid #CCC;
border-left: none;
border-right: none;
position: relative;

blockquote.tweetable::before {
content: '“';
position: absolute;
top: 0;
left: 0;
font-size: 4em;
font-family: "inherit";
font-weight: bold;
color: #888;

blockquote.tweetable p {
margin: 0 0 0.5em 1.5em;
font-style: italic;

## List of configuration parameters

### Social buttons

List of social networks for sharing. By default contains all supported networks:

networks=('twitter', 'google', 'facebook', 'vkontakte',)

You can also specify it as a string (useful if you configured this markdown extension using module path with parameters):


### HTML snippet

By default it looks like this:

snippet='''<blockquote class="tweetable">
<p class="tweetable-buttons">{buttons}</p>

### Google Client ID

By default it is not valid:


### Social button classes

Useful for customizing button's CSS:

facebook_class='fa fa-facebook-square'
google_class='fa fa-google-plus-square'
twitter_class='fa fa-twitter-square'
vkontakte_class='fa fa-vk'

Given all these configuration options, the resulting HTML markup would look like this:

<blockquote class="tweetable">
<p>When there is state there can be no freedom,
but when there is freedom there will be no state.
-- Vladimir Lenin

<p class="tweetable-buttons">
<a class="tweetable-button"
title="Click to share on Twitter"
<span class="fa fa-twitter-square"></span>

<a href="javascript:void(0)"
title="Click to share on Google+"
class="tweetable-button g-interactivepost"
data-prefilltext="When there is state there can be no freedom,
but when there is freedom there will be no state.
-- Vladimir Lenin">
<span class="fa fa-google-plus-square"></span>

<a class="tweetable-button"
title="Copy the text, then click to share on Facebook"
<span class="fa fa-facebook-square"></span>

<a class="tweetable-button"
title="Click to share on VKontakte"
<span class="fa fa-vk"></span>

### Button docs:


NOTE: Facebook button sucks, because it [does not support]( prefilled text.

## Dependencies

* [Markdown 2.0+](

Default HTML snippet uses Twitter Bootstrap and Font Awesome, but you are free to change it and create your own markup and style.

## Copyright

Copyright 2014 [Max Arnold](, all rights reserved.

This software is released under the MIT License.
Release History

Release History

History Node


History Node


History Node


History Node


History Node


History Node


This version
History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
markdown-tweetable-1.0.1.tar.gz (20.5 kB) Copy SHA256 Checksum SHA256 Source Jun 17, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting