Logo in HTML-header

MicTie
Posts: 9
Joined: Mon Dec 07, 2020 12:57 pm

Logo in HTML-header

Post by MicTie » Wed May 19, 2021 7:52 am

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: 7529
Joined: Fri Jul 09, 2004 5:18 pm

Re: Logo in HTML-header

Post by Radu » Wed May 19, 2021 8:40 am

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: 9
Joined: Mon Dec 07, 2020 12:57 pm

Re: Logo in HTML-header

Post by MicTie » Wed May 19, 2021 10:04 am

Thanks that works great!

Post Reply