2014-03-05 37 views
0

AsciiDoc的此塊將創建一個標題和當前版本信息:自動,表格式,修訂歷史AsciiDoc文件

Writing Documentation using AsciiDoc 
==================================== 
v2.0, February 2003: 
Rewritten for version 2 release. 

docinfo_generator將一個AsciiDoc格式的文檔中提取註釋塊信息,然後將其嵌入在docinfo.xml文件:

//// 
:revinfo: 
v1.0.3, Joseph HERLANT, 2013-08-18: 
    It matched only the last group. Correcting this to get only the first of each groups 
    to avoid getting data in the content of the document if defined in the header 
v1.0.2, Joseph HERLANT, 2013-07-05: Adding a verbose flag to show more informations while processing data. 
v1.0.1, Laurent LICOUR, 2013-06-05: 
    Correcting documentation. 
    If attributes were absent, the document did not generate. This is corrected now. 
//// 

雖然有用,但修訂歷史將不會被包含在asciidoc生成的HTML(這可能是在A2X-gerneated HTML,但還沒t測試了這一點)。

我想找到一種方法將整個修訂歷史記錄嵌入asciidoc格式的文檔中,然後將其顯示(理想情況下)作爲表格顯示在所述文檔的末尾。

這可能嗎?

回答

0

可以定義部分[header][footer]asciidoc.conf或在一個單獨的文件中,然後用-f命令行開關將其插入。這些部分包含HTML代碼,請在需要插入信息的地方插入{attr-name}。例如

[header] 
<html> 
    <head> 
     <title>{title}</title> 
    </head> 
    <body> 

[footer] 
    </body> 
</html> 

在標題標記中設置文檔標題。

其實我使用那些部分作爲HTML模板,所以所有的HTML頁面都在那裏定義,AsciiDoc編譯後的代碼將被插入到兩部分之間。