pip安装pelican-social 复制PIP说明
发布时间: 2017年2月2日
Pelican博客生成器的社会指令
Pelican静态博客生成器的社会指令。
通过简单的内联指令轻松链接到社交网络内容。
pelican-social与Pelican 3.3+和Python 2.7兼容。
通过pip安装插件
~$ pip install pelican-social
要加载插件,您必须在设置文件中添加它。
PLUGINS = ( 'social', )
加载后,您将可以访问社会rst指令。
每个指令都可以以两种形式调用
:network:`target` :network:`Displayed text <target>`
尽可能,指令提供安全的(https)链接。
您可以使用:twitter:和:tw:指令来链接到Twitter个人资料,它们是等效的。使用用户名中的@将只更改显示的用户名,如果未指定自定义显示方式。
示例
:twitter:`username` :twitter:`@username` :twitter:`User <username>` :twitter:`User <@username>`
将导致
<a href="https://twitter.com/username">username</a> <a href="https://twitter.com/username">@username</a> <a href="https://twitter.com/username">User</a> <a href="https://twitter.com/username">User</a>
Google+对用户名很棘手。如果您是名人且幸运的话,您可以在+MyUser形式中拥有自定义用户名。如果没有,您将有一个21位数字标识符。
:gplus:`username` :gplus:`User <username>`
<a href="https://plus.google.com/username">username</a> <a href="https://plus.google.com/username">User</a>
您可以使用:github:和:gh:指令来链接到github个人资料、仓库和问题/拉取请求(如果问题与拉取请求相关联,github将自动将您重定向到拉取请求)。
以下形式被接受
目标
期望的目标形式
个人资料
用户名
仓库
用户名/仓库
问题/拉取请求
用户名/仓库#问题
:github:`username` :github:`User <username>` :github:`username/repository` :github:`Repository <username/repository>` :github:`username/repository#2` :github:`Issue #2 <username/repository#2>`
<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:和:fb:指令来链接到Facebook个人资料,它们是等效的。
:facebook:`User <username>` :facebook:`username`
<a href="https://facebook.com/username">User</a> <a href="https://facebook.com/username">username</a>
支持Pelican 3.7+和Python 3.3+
停止支持Python 3.2
处理Github用户名和仓库名中的点和破折号
Facebook个人资料
Twitter个人资料
Google+个人资料
Github个人资料、仓库和问题
0.2.0
2017年2月2日
0.1.1
2013年7月2日
0.1
2013年6月20日
下载适用于您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。
上传时间 2017年2月2日 Python 2 Python 3
Python 2
Python 3
fd65a79200f0a1dea2303dde691794715bab1e1af7515b778640fc0e5d520aaa
6c9b414bcc087a219bb7276d99d06efd
4f1cb43f3d131c104e92fca29fe80075f5049376c6c0793248930c2b3efba74c
由以下组织支持
Pelican的社会插件
Pelican静态博客生成器的社会指令。
通过简单的内联指令轻松链接到社交网络内容。
兼容性
pelican-social与Pelican 3.3+和Python 2.7兼容。
安装
通过pip安装插件
用法
要加载插件,您必须在设置文件中添加它。
加载后,您将可以访问社会rst指令。
每个指令都可以以两种形式调用
尽可能,指令提供安全的(https)链接。
Twitter
您可以使用:twitter:和:tw:指令来链接到Twitter个人资料,它们是等效的。使用用户名中的@将只更改显示的用户名,如果未指定自定义显示方式。
示例
将导致
Google+
Google+对用户名很棘手。如果您是名人且幸运的话,您可以在+MyUser形式中拥有自定义用户名。如果没有,您将有一个21位数字标识符。
示例
将导致
Github
您可以使用:github:和:gh:指令来链接到github个人资料、仓库和问题/拉取请求(如果问题与拉取请求相关联,github将自动将您重定向到拉取请求)。
以下形式被接受
目标
期望的目标形式
个人资料
用户名
仓库
用户名/仓库
问题/拉取请求
用户名/仓库#问题
示例
将导致
Facebook
您可以使用:facebook:和:fb:指令来链接到Facebook个人资料,它们是等效的。
示例
将导致