2
试图增加每文档一个简单的真/假值这里:狮身人面像add_config_value不添加变量
http://sphinx-doc.org/ext/ifconfig.html
在我conf.py
文件:
extensions = ['sphinx.ext.todo', 'sphinx.ext.ifconfig']
# Custom variables
def setup(app):
app.add_config_value('responsiveenabled', True, True)
在我grids.rst
文件(网页来描述如何建立一个自举网格),我有这样的:
.. ifconfig:: responsiveenabled
Blah blah blah.
我得到的错误是:
NameError: name 'responsiveenabled' is not defined
我需要的responsiveenabled
后的东西,像 “在(...)”?我想保持它不知道我正在写的文档的哪个版本。