Logo in HTML-header

Post here questions and problems related to editing and publishing DITA content.
MicTie
Posts: 14
Joined: Mon Dec 07, 2020 12:57 pm

Logo in HTML-header

Post 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!
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: Logo in HTML-header

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
MicTie
Posts: 14
Joined: Mon Dec 07, 2020 12:57 pm

Re: Logo in HTML-header

Post by MicTie »

Thanks that works great!
Post Reply