Login  Register

Re: How can I use asciidoc conf file

Posted by mojavelinux on Nov 23, 2013; 3:28am
URL: https://discuss.asciidoctor.org/How-can-I-use-asciidoc-conf-file-tp1005p1062.html

In order to include custom header and footer HTML, you need to override the document template. You can do this by

1. Grabbing one of the document templates from the asciidoctor-backends repository:

erb: https://github.com/asciidoctor/asciidoctor-backends/blob/master/erb/html5/document.html.erb
haml: https://github.com/asciidoctor/asciidoctor-backends/blob/master/haml/html5/document.html.haml
slim: https://github.com/asciidoctor/asciidoctor-backends/blob/master/slim/html5/document.html.slim

2. Save the file to a custom backends directory of your choice

3. Modifying the template however you want

4. Specifying the location of the custom backends directory when you run Asciidoctor

asciidoctor -T /path/to/backends file.adoc

If calling Asciidoctor via the API, use the option :templates_dir => '/path/to/backends'

Note that you can also use the docinfo footer file to include custom HTML, but you are limited to where Asciidoctor places it by default (unless you also modify the document template).

-Dan


On Mon, Nov 18, 2013 at 3:51 AM, ch007m [via Asciidoctor :: Discussion] <[hidden email]> wrote:
The html5.conf file used by RedHat GPE Training team contains a banner.html and footer.html which is included by asciidoc during rendering process of each asciidoc file (see end of the gist file where you will see include::../banner.html and include::../footer.html)

By example, Banner.txt (=asciidoc) corresponds to the following syntax :

:data-uri:

image::../common/images/rhheader.png[width=1024,height=152,align="center"]




If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/How-can-I-use-asciidoc-conf-file-tp1005p1007.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | http://google.com/profiles/dan.j.allen