【发布时间】:2015-11-30 19:51:28
【问题描述】:
我是 Sphinx 和 reStructuredText 的新手。
在我的 Sphinx conf.py 中我定义了:
version = '0.0.2'
在tutorial.rst 内部,我想访问version 变量并在我的html 文件中显示0.0.2。我试过了:
version
|version|
:version:
.. |version|
.. :version:
版本内容测试成功。
.. ifconfig:: version == '0.0.2'
This prints!
这令人鼓舞,但不是我想要的。
【问题讨论】:
标签: python python-sphinx restructuredtext