Hi everybody,
I'm currently writing a technical documentation with asciidoctor. Currently it looks exactly the same like your user manual. But now I want to add a custom header or at least extend the header generated by asciidoctor. I found the mechanism for docinfo to customize the document-footer. But putting own html-stuff into the footer and nail it at the top of the document with css isn't that elegant in the end. So is there any mechanism e.g. to extend the header-div of the generated documents with some custom html-code? Thanks and best regards. Ulrich |
The header part is docinfo instead of docinfo-footer :)
On Tuesday, April 5, 2016, ulehner-hs [via Asciidoctor :: Discussion] <[hidden email]> wrote: Hi everybody, -- Sent from Gmail Mobile |
Administrator
|
Correct, the default docinfo file goes at the top of the HTML file, but it gets expanded inside the <head> element. We call this the "head" location. What you're looking for is an insertion point within the <body> element. In 1.5.4, I made an internal change to accommodate additional locations, such as "header". The "header" location would expand content within the <body> element, near the top. The next step is to add support for the "header" location in the built-in converters, as I have proposed here: You can accomplish this today by supplying a custom document template to the template converter. $ asciidoctor -T templates/document.html.slim document.adoc Somewhere in that template, you'd use: - unless (docinfo_content = (docinfo :header)).empty? =docinfo_content Cheers, -Dan On Tue, Apr 5, 2016 at 8:33 AM, LightGuardjp [via Asciidoctor :: Discussion] <[hidden email]> wrote: The header part is docinfo instead of docinfo-footer :) Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen |
This was what I tried at first. But then I saw that the content of the docinfo.html is put into the <head>-container as Dan said. That leads to an invalid html-document. That's great, thank you! I'll test that as soon as I get access to a linux. Thank you all for your fast replies. |
Free forum by Nabble | Edit this page |