Applying Oxygen CSS

Post here questions and problems related to editing and publishing DITA content.
ramanath18
Posts: 6
Joined: Thu May 23, 2019 12:09 pm

Applying Oxygen CSS

Post by ramanath18 »

Hi,
I have a set of plain HTML files generated using the HTML5 transformation. I would like to know if it's possible to apply Webhelp's CSS to these HTML files. If so, could you please provide instructions on how to do this?
alin
Site Admin
Posts: 270
Joined: Thu Dec 24, 2009 11:21 am

Re: Applying Oxygen CSS

Post by alin »

Hello,

You can try the following workaround:
  1. Create a new CSS file
  2. Generate a WebHelp output for your DITA sources
  3. Use the browser inspector to identify the CSS file of interest
  4. Copy the CSS rules to your CSS file created above
  5. Add your CSS file to the HTML5 transformation using the procedure described here: https://www.dita-ot.org/dev/topics/html ... n-css.html
Regards,
Alin
Alin Balasa
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
ramanath18
Posts: 6
Joined: Thu May 23, 2019 12:09 pm

Re: Applying Oxygen CSS

Post by ramanath18 »

Hey Alin, thanks for providing the information. I've followed the DITA Open Toolkit documentation and managed to use a custom .css file for plain HTML files. Currently, I'm utilizing the customized transformation to generate HTML files instead of using Oxygen's default WH transformations. However, I've encountered an issue where the output directory does not contain an index.html file.
Is there any way, we can set any parameter to generate index.html during the transformation?
Last edited by ramanath18 on Fri Aug 02, 2024 4:14 pm, edited 1 time in total.
Costin
Posts: 843
Joined: Mon Dec 05, 2011 6:04 pm

Re: Applying Oxygen CSS

Post by Costin »

Hi ramanath18,

We tested using the HTML5 transformation that comes predefined (and which comes bundled with the DITA-OT in Oxygen) and there seems nothing wrong with publishing the output (which includes the index.html toc page).
There is a dedicated parameter in Oxygen transformation configuration dialog (under the "Parameters" tab), called "args.html5.toc". That parameter can be used to specify the name for the toc file, which - by default - is "index.html". You should double check if you are using that parameter with a custom value.

Going further, if you are using the default HTML5 transformation that comes predefined from the DITA-OT, you could obtain detailed advice from the DITA-OT specialists on the DITA-OT discussion forum on GitHub and the DITA User Lists:
https://dita-users.groups.io/g/main
https://groups.google.com/g/dita-ot-users

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
ramanath18
Posts: 6
Joined: Thu May 23, 2019 12:09 pm

Re: Applying Oxygen CSS

Post by ramanath18 »

Thanks for the information, Costin.
The links will be helpful.
Post Reply