如何.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
文件自定义模板?例如,我想使用具有以下内容的文件运行rst2html example.rst -o example.html -p example.properties
命令:example.properties
custom_text=this is the value of custom property
可能吗?reStructuredText 是否完全支持模板功能?
编辑:请注意,我想从命令行自定义模板或使用常规.properties
文件(可由 Ant/Maven 构建管理工具使用)。