狮身人面像
sphinxcontrib-gravatar的Python项目详细描述
SphinxContrib Gravatar是Gravatar的Sphinx扩展名
功能
- 为文档提供gravatar icon。
设置
使用pip创建环境:
$ pip install sphinxcontrib-gravatar
用法
设置conf.py:
# set extension extensions += ['sphinxcontrib.gravatar'] # define gravatar users gravatar_users = ( ('tell-k', {'email': 'ffk2005@gmail.com' }), )
编写Gravatar角色:
.. gravatar:: tell-k # If you wanted to write in the text. you can use "Substitution References". .. |tell-k-gravatar| gravatar:: tell-k my gravatar image |tell-k-gravatar|.
然后运行:
$ make html
选项
要做更多的记录。
conf.py选项:
gravatar_default_size = 30 gravatar_default_image = "http://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50" gravatar_default_rating = "pg" gravatar_default_target = "http://github.com/tell-k/" gravatar_force_default = True gravatar_force_refresh = True gravatar_unlink = True gravatar_default_class = "custom-classname" gravatar_users = ( ('tell-k', { 'email': 'ffk2005@gmail.com', 'default': 'http://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50', 'force_default': True, 'unlink': True, 'target': "http://github.com/tell-k/", 'rating': "pg", 'class': u"custom-classname", 'alt': "alternative text", }), )
指令选项:
.. gravatar:: tell-k :size: 200 :default: mm :target: http://github.com/tell-k :rating: pg :class: test-gravatar :alt: altnativetext
要求
- Python2.7或更高版本。
- 狮身人面像1.2.x或更高版本。
许可证
- SphinxContrib Gravatar根据BSD许可证获得许可。
具体条款见许可文件。
历史记录
0.1.2(2015年1月1日)
- 从已安装的软件包中排除测试代码
0.1.1(2014年12月31日)
- 放弃python-3.2支持。#1
- 支持轮子格式。
0.1.0(2014年10月2日)
- 首次发布