Re: Single CSS for multiple, nested adoc files
Posted by
ChrLipp on
URL: https://discuss.asciidoctor.org/Single-CSS-for-multiple-nested-adoc-files-tp552p574.html
Hi Dan,
thanks for your feedback. I could live with duplicating (or multiplying) the css, I just wanted to learn if maybe there is a solution already there which I didn't notice.
Anyway, I would like to suggest another approach and you decide if you take any action:
Solution E ::
- Copy the CSS manually.
- Link to the stylesheet with stylesdir and linkcss
- Provide an additional flag like useRelativeCssLinking which takes the adoc path and the css path and tries to compute a relative path. If this is possible, use it. If not, stick to the absolute path.
Of course the path has to be converted to / directory seperators if it is a file path and used under windows. If under window that upper case / lower case handling might also be an issue.
I don't know Ruby, but in Java this is done with
http://docs.oracle.com/javase/7/docs/api/java/nio/file/Path.html#relativize(java.nio.file.Path)
Solution F ::
Don't use nested dirs, put everything in the root dir :-)
What do you say?
Kind regards, Christian