【发布时间】:2013-03-19 10:07:30
【问题描述】:
假设我有三个 apt 文件:
main.apt
Info, details, etc..
some text
Configuration
some text
child1.apt
Info, details, etc..
some text
Configuration
[Same text as MAIN.APT configuration]
child2.apt
Info, details, etc..
some text
Configuration
[Same text as MAIN.APT configuration]
我想遵循 DRY(不要重复自己)原则并重用 main.apt 中的文本并将其添加到 child1.apt 和 child2.apt。这对编写文档很有帮助。
我尝试过使用 sn-ps(首先生成带有 id 的站点文档,然后添加对这些 id 的引用):
~~START SNIPPET: id
~~END SNIPPET: id
%{snippet|id=id|url=http://svn.example.com/path/to/main.html}
并使用
生成网站 mvn site:stage
,但这不起作用,因为它插入了未格式化为 html 的 html 文本块。我也试过 sn-ps 中的逐字参数,它没有帮助。
也许有人对此问题有解决方案和/或面临同样的问题?请告诉我你的故事,建议。解决方案可以节省我的时间:)
【问题讨论】:
标签: java maven documentation-generation apt doxia