0

This block of AsciiDoc will create a title and current revision information:

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

The docinfo_generator will extract this information from a comment block in an AsciiDoc-formatted document, then embed it in the docinfo.xml file:

////
: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.
////

While useful, the revision history won't be included in the asciidoc-generated HTML (it might be in the a2x-gerneated HTML, but I haven't tested this).

I would like to find a way to embed the entire revision history in a asciidoc-formatted document, then have it displayed (ideally) at the end of said document as a table.

Is this possible?

craig
  • 25,664
  • 27
  • 119
  • 205

1 Answers1

0

You can define the sections [header] and [footer] in asciidoc.conf or in a separate file an then insert it with -f command line switch. Those sections contains HTML code, insert the {attr-name} where you need to insert your information. For example

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

[footer]
    </body>
</html>

set the document title in the header tag.

Actually I use those section as a HTML template, so all the HTML page is defined there, the AsciiDoc compiled code will be inserted between the two sections.