Page 1 of 1

Logo in HTML-header

Posted: Wed May 19, 2021 7:52 am
by MicTie
How do I add a logo (c-logo.png) to HTML5 output?

When using the 'DITA Map HTML5' - transformation to create HTML-output, I am able to create a custom-header with text, but I am unable to reference a logo.
Which folder should I put my 'c-logo.png' so that it's 'transfered' to the 'out-folder', and it can be referenced in the header.xml-file?
The html seems expecting the file under 'out/html5/topics' ...

Thanks for your help!

Re: Logo in HTML-header

Posted: Wed May 19, 2021 8:40 am
by Radu
Hi,

One option would be to have the logo image embedded in the header with base 64 encoding.
Other than that maybe you can copy the image in the "topics" folder near the topics and refer to it in the DITA Map using something like:

Code: Select all

<topicref href="topics/image.png" format="png" processing-role="resource-only"/>
That "resource-only" means that the HTML table of contents will not contain a reference to the image but the image should be copied to the output folder.

Regards,
Radu

Re: Logo in HTML-header

Posted: Wed May 19, 2021 10:04 am
by MicTie
Thanks that works great!