python降价的tweetable引用。

markdown-tweetable的Python项目详细描述


#python markdown的tweetable引号

为什么要使用这个扩展?很多博客文章在页面的顶部或底部都有社交分享按钮。但最近有一种趋势是将可共享的引用直接嵌入到文章正文中,这明显增加了内容共享。有些网站甚至允许你选择文本的任何部分并与他人分享(例如,参见[medium.com](https://medium.com/life-learning/7-reasons-why-you-will-never-do-anything-amazing-with-your-life-2a1841f1335d)。基本的观点是人们喜欢引用一个故事而不是它的标题。你可以在一个故事中有多个可分享的引用!

使用此扩展,您可以将下面的文本:

[tweetable url="http://www.brainyquote.com/quotes/authors/v/vladimir_lenin.html"]
当存在状态时,就没有自由,
但是当存在自由时,就没有状态。
--vladimir lenin
[/tweetable]

很好的风格引用:

![引用截图](/screenshot.png)
































>完整语法:



[tweetabalt="有状态就没有自由,就没有自由,











[tweetab[可发alt[有/>B类但是,当有自由的时候,就没有状态了"
url="http://en.wikipedia.org/wiki/vladimir棼lenin"
hashtags="lenin"]
当有状态的时候,就没有自由,但是当有自由的时候就没有状态了。
--vladimir lenin
[/tweetable]

E风格。下面是一个例子:

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;

顶部:0;
左侧:0;
字体大小:4em;
字体系列:"继承";
字体粗体;
颜色:888;
}


blockquote.tweetable p{
边距:0 0 0.5em 1.5em;
字体样式:斜体;
}

。tweetable svg图标{
/*填充:db3535;*/
宽度:1em;
}


默认情况下,包含所有支持的网络:

networks=("twitter"、"facebook"、"linkedin"、"vkontakte",)


它看起来是这样的:


snippet=''<;blockquote class="tweetable">;
<;p>;{quote}<;p>;
<;p>;
<;p class="tweetable按钮">;{按钮}<;p>;
<;











snippet='<;a class="tweetable按钮按钮"<;a class="tweetable按钮式按钮"<;lt;lt;p<;p>;
>;title="复制文本,然后单击在Facebook上共享"
href="https://www.facebook.com/sharer/sharer.php?u={urlq}"
target="(u blank)>;
{icon\u facebook}<;/a>;'''


snippet\u linkedin=''<;a class="tweetable button"
title="点击linkedin上的分享"
ref="http://www.linkedin.com/sharearticle?mini=true&url={urlq}&title={quote}"
target="{blank">;
{icon\u linkedin}<;/a>;''


snippet\u twitter='<;a class="tweetable button"
title="点击在twitter上分享"
ref="https://twitter.com/intent/tweet?text={quote}&url={urlq}&hashtags={hashtags}"
target="空白">;
{icon_twitter}<;/a>;'''

snippet_vkontakte=''<;a class="tweetable button"
title="单击vkontakte上的共享"
href="https://vk.com/share.php?



{icon{vkontakte}<;a>;'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''记录
<;lt="512"rx="15%"width="512"width="512"
>;
<;path d="M287 456V-299C0-299C0-299C0-21 6-35 35 35-35H38V-63C-7-1-29-3-55-3-55-3-54 0-91-36-91 94V306M143-2545-205V72H196"fill="fff" />>;
>;''''


=='''>icon-linkedin=''''
>>>>>>>>>>>>>>''''''
>>>>>>>>>>'

图标tter=''

'


icon_vkontakte='

'



>给定所有这些配置选项,生成的HTML标记将如下:

<;blockquote class="tweetable">;
<;p>;当存在状态时,可能存在没有自由,
但是当有自由的时候,就没有状态。
--弗拉基米尔·列宁
<;p>;

<;p class="Tweetable Buttons">;
<;a class="Tweetable Button"
title="点击在Twitter上分享"
//twitter.com/intent/tweet?text=when+there+is+state+there+can+be+no+freedom%2c%0abut+when+there+freedom+there+will+be+no+state%0a--+vladimir+lenin&;url=http%3a%2f%2fwww.brainyquote.com%2fquotes%2fautors%2fv%2fvladimir\u lenin.html&;hashtags="
target="
<;svg>;twittetr图标在这里…<;/svg>;
<;/a>;

<;a class="tweetable button"
title="复制文本,然后单击在Facebook上共享"
ref="https://www.facebook.com/sharer/sharer.php?u=http%3a%2f%2fwww.brainyquote.com%2fquotes%2fAuthors%2fv%2ffladimir_lenin.html"
target="撸blank">;
<;svg>;此处为Facebook图标…<;/svg>;
<;/a>;

<;a class="Tweetable Button"
title="点击LinkedIn共享"
请访问http://www.linkedin.com/shareticle?mini=true&url={http%3A%2F%2Fwww.brainyquote.com%2Fquotes%2Fauthors%2Fv%2Fvladimir_lenin.html}&title={当+存在+状态+存在+不存在+自由%2c%0abut+当+存在+自由+存在+将+存在+不存在+状态%0a--+vladimir+lenin}"
target="空白">;
<;svg>;LinkedIn图标在这里…<;/svg>;
<;/a>;

<;a class="tweetable button"
title="单击vkontakte上的共享"
ref="https://vk.com/share.php?url=http%3a%2f%2fwww.brainyquote.com%2fquotes%2fAuthors%2fv%2ffladimir_lenin.html&;title=when+there+state+there+can+be+no+freedom%2c%0abut+when+there+freedom+there+will+be+no+state.%0a--+vladimr+lenin"
target="
<;svg>;vkontakte icon here…。<;/svg>;
<;/a>;
<;/p>;
<;/blockquote>;



按钮文档:

*https://developers.facebook.com/docs/plugins/share button/
*http://developer.linkedin.com/documents/share linkedin
*https://dev.twitter.com/docs/tweet button
*http://vk.com/dev/share-details

注意:

*Facebook按钮很糟糕,因为它[不支持](http://stackoverflow.com/questions/20956229/has-facebook-sharer-php-changed-to-no-long-accept-detailed-parameters)预填文本。
*LinkedIn[不支持](http://help.linkedin.com/app/answers/detail/a懅id/5028/~/linkedin signal---不再支持)标签。


\svg图标


>默认共享按钮使用[超小图标](https://github.com/edent/super tiny icons)呈现。

kDUnter/

版权

2014-2017版权[Max Arnold](http://ar0.me/blog/en/),保留所有权利。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Clojure关键字在内存中的大小是多少?   Java中有固定长度的通用数组对象吗?   PostgreSQL:通过Java更新我的用户表   错误:使用java解析xml   java Json显示列表中对象的名称   java比较JodaTime时区   与JAVA中的API和包的区别?   java的int值在for循环中不改变   谷歌应用引擎中的java RSA   迁移到spring 5后出现java非法字符错误   java Websphere管理控制台不工作   JavaGSON如何始终在json中包含毫秒?   带有空格和双引号的windows Java ProcessBuilder命令参数失败   java错误:重复的zip条目[43.jar:org/apache/http/annotation/NotThreadSafe.class]