docinfo-header or equivalent?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

docinfo-header or equivalent?

ulehner-hs
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
Reply | Threaded
Open this post in threaded view
|

Re: docinfo-header or equivalent?

LightGuardjp
The header part is docinfo instead of docinfo-footer :)

On Tuesday, April 5, 2016, ulehner-hs [via Asciidoctor :: Discussion] <[hidden email]> wrote:
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


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/docinfo-header-or-equivalent-tp4595.html
To start a new topic under Asciidoctor :: Discussion, email <a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;ml-node%2Bs49171n1h37@n6.nabble.com&#39;);" target="_blank">ml-node+s49171n1h37@...
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Sent from Gmail Mobile
Reply | Threaded
Open this post in threaded view
|

Re: docinfo-header or equivalent?

mojavelinux
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 :)

On Tuesday, April 5, 2016, ulehner-hs [via Asciidoctor :: Discussion] <[hidden email]> wrote:
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


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/docinfo-header-or-equivalent-tp4595.html
To start a new topic under Asciidoctor :: Discussion, email <a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#[hidden email]&#39;);" target="_blank">ml-node+s49171n1h37@...
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Sent from Gmail Mobile



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



--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen
Reply | Threaded
Open this post in threaded view
|

Re: docinfo-header or equivalent?

ulehner-hs
LightGuardjp wrote
The header part is docinfo instead of docinfo-footer :)
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.

mojavelinux wrote
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:

https://github.com/asciidoctor/asciidoctor/issues/1720
That's great, thank you!

mojavelinux wrote
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
I'll test that as soon as I get access to a linux.

Thank you all for your fast replies.