Page 1 of 1
Changing location of skin.css file
Posted: Tue Dec 13, 2016 11:46 am
by Anonymous1
Hi,
we use the WebHelp Responsive to release WebHelp manuals for several of our products. At the moment, each product has its own skin.css file that is located in the webhelp template folder of each product.
Is it possible to make the output look at another location for the skin.css file? We only want to have a single skin.css on our server to be able to apply .css changes to all our WebHelps at the same time. Can I customize this somewhere in the WebHelp framework?
Best regards,
Benjamin
Re: Changing location of skin.css file
Posted: Wed Dec 14, 2016 4:06 pm
by bogdan_cercelaru
Hi Benjamin,
Unfortunately you cannot change/set the location of the skin.css file using the current implementation.
As a workaround, you could try to use symbolic links on your web server that points to a common skin.css. To do this, you have to replace the skin.css file in every webhelp output with a symbolic link that points to the common skin.css file.
Regards,
Bogdan
Re: Changing location of skin.css file
Posted: Wed Dec 14, 2016 6:07 pm
by Anonymous1
Thanks for you answer. That's disappointing then. Maintaining multiple WebHelp outputs will require a lot of manual work if we have to replace files in each output.
Could we maybe use the args.cssroot paramter for this?
Re: Changing location of skin.css file
Posted: Fri Dec 16, 2016 4:20 pm
by bogdan_cercelaru
Hello,
According to
DITA-OT Documentation, the
args.cssroot parameter is used to:
Specifies the source directory that contains the custom .css file.
In your case, you could try to use the
args.csspath parameter to specify the destination directory for the CSS specified with the
args.css and
args.copycss parameters. Please note that in this case the value of the
args.csspath parameter should be relative to the output directory and it can be set to be copied outside of the output directory (e.g: ../custom_css_directory).
Regards,
Bogdan
Re: Changing location of skin.css file
Posted: Thu Dec 22, 2016 1:36 pm
by Anonymous1
I'm afraid we need to be able to set an absolute path to a CSS file.
Is there a way to implement a line into the <head> of the HTML-output of each topic?
Re: Changing location of skin.css file
Posted: Thu Dec 22, 2016 6:00 pm
by bogdan_cercelaru
Hello,
You can add an absolute path to a CSS file by editing the template files and replace the
with HTML element that links the required CSS file. e.g:
Code: Select all
<link rel="stylesheet" type="text/css" href="absolute_url_to_css_file" />
The template files that have to be modified are:
- ${DITA_OT_DIR}/plugins/com.oxygenxml.webhelp/templates/dita/bootstrap/wt_index.html
- ${DITA_OT_DIR}/plugins/com.oxygenxml.webhelp/templates/dita/bootstrap/wt_search.html
- ${DITA_OT_DIR}/plugins/com.oxygenxml.webhelp/templates/dita/bootstrap/wt_terms.html
- ${DITA_OT_DIR}/plugins/com.oxygenxml.webhelp/templates/dita/bootstrap/wt_topic.html
The "absolute_url_to_css_file" could be also a root-relative URL.
Regards,
Bogdan
Re: Changing location of skin.css file
Posted: Fri Dec 30, 2016 4:05 pm
by Anonymous1
Great! That's just what I needed. Thank you.