【发布时间】:2012-04-04 01:26:11
【问题描述】:
如何使用实际值自定义 .rst 文件中的占位符?
例如,我有 example.rst 文件,内容如下:
Header
------------------------------------
${custom_text}
我想通过运行以下命令将 ${custom_text} 属性替换为值 this is the value of custom property:
rst2html example.rst -o example.html -Dcustom_text="this is the value of custom property"
我也想知道是否可以使用.properties 文件自定义模板?例如,我想使用example.properties 文件运行rst2html example.rst -o example.html -p example.properties 命令,其内容如下:
custom_text=this is the value of custom property
有可能吗? reStructuredText 是否完全支持模板功能?
编辑:请注意,我想从命令行自定义模板或使用常规的.properties 文件(可由 Ant/Maven 构建管理工具使用)。
【问题讨论】:
标签: documentation markup restructuredtext docutils