用reStructuredText来写博客(测试)

作者: the5fire 标签: reStructuredText blog 发布: 2013-02-26 阅读: 12443

reStructuredText是什么

它是一个类似于MarkDown的标记语言,具体可参考这里:http://zh.wikipedia.org/wiki/ReStructuredText, 手册在这里:http://sphinx-doc-zh.readthedocs.org/en/latest/rest.html 下面用几个例子来说明这个东西怎么用

章节

# 有上标线, 用以部分
* 有上标线, 用以章节
= 用以小节
- 用以子节
^ 用以子节的子节
" 用以段落

段落

用空行隔开就自动识别为一个段落

链接

效果:

Link text test

code:

`Link text <http://example.com/>`_
 上面的代码放到内容中的需要前后空格。

代码<code>

效果:

#coding:utf-8

def hello():
    print 'hello the5fire'

code:

.. code:: python

    #coding:utf-8

    def hello():
        print 'hello the5fire'

---- EOF ----

微信公众号:Python程序员杂谈

相关文章

上一篇 WPS for Linux