Login  Register

Re: Creating a visible Revision History

Posted by mojavelinux on Nov 23, 2018; 4:53pm
URL: https://discuss.asciidoctor.org/Creating-a-visible-Revision-History-tp6594p6595.html

Patrick,

The docinfo file you created is for DocBook output, but you are creating an HTML document. You either need to create a DocBook file:

asciidoctor -b docbook book.adoc

or you need to make a docinfo file for HTML named book-docinfo.html.

Asciidoctor is simply injecting the docinfo content into the output document.

See https://asciidoctor.org/docs/user-manual/#docinfo-file for details.

Cheers,

-Dan

On Fri, Nov 23, 2018 at 9:44 AM Patrick Ben Koetter [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Greetings!

First of all thank you very much for all the great work you've put into asciidoctor. I'm a long time asciidoc user and you've really taken the subject a significant step further.

I'm trying to place a visible revision history at the beginning of a book. Searching the archives I found references suggesting I should create an XML file (just like in asciidoc). This file should be named like the book, but have an additional suffix "-docinfo.xml".

I did so, but asciidoctor doesn't seem to embed the contents of the docinfo file. Is there any additional switch/option I need to set? Here's what I did to verify procedure...

I've created a book.adoc file and added these attributes:

----
Book
====
:doctype: book
:docinfo: private
----

Then I created a dook-docinfo.xml file, containing this dataset:

----
<revhistory>
  <revision>
    <revnumber>0.01</revnumber>
    <date>2018-11-22</date>
    <authorinitials>PBK</authorinitials>
    <revremark>
        First remark
    </revremark>
  </revision>
  <revision>
    <revnumber>0.02</revnumber>
    <date>2018-11-23</date>
    <authorinitials>PBK</authorinitials>
    <revremark>
        Another remark
    </revremark>
  </revision>
</revhistory>
----

Finally I used this command to proecess the asciidoc file and have it create HTML output:

$ asciidoctor book.adoc

But the only file that holds the string remains book-docinfo.xml:

$ grep PBK book*
book-docinfo.xml:    <authorinitials>PBK</authorinitials>
book-docinfo.xml:    <authorinitials>PBK</authorinitials>

Am I doing it wrong?

Thanks,

p@rick

$ asciidoctor -V
Asciidoctor 1.5.8 [https://asciidoctor.org]
Runtime Environment (ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Creating-a-visible-Revision-History-tp6594.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux