Re: Single CSS for multiple, nested adoc files

Posted by mojavelinux on
URL: https://discuss.asciidoctor.org/Single-CSS-for-multiple-nested-adoc-files-tp552p605.html

Alex,

We should be in good shape with include files as of 0.1.4. Include files are always calculated relative to the file that doing the including. That way, it's intuitive where it's looking. You can, of course, use an absolute include path by prefixing the path with an attribute reference that resolves to some root.

The main issue at stake here seems to be references in the output files to project-relative assets. The stylesheet is one example, but the same goes for JavaScript files and images too. It works fine when processing one file, or a group of files in the same directory. But once you start processing files in subdirectories under the same invocation of Asciidoctor, then the paths in stylesdir, imagesdir and scriptsdir is incorrect.

-Dan


On Thu, Sep 12, 2013 at 6:57 AM, asotobu [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Dan I think we need a way to handle this situation, for example in my talks about Asciidoctor, and when I teach personally to my mates how documentations should be written, I encourage them to create as many as adoc files as required and more important distribute them across their project as with code; so for example in src/main/resources/file1.adoc would contain the index file with includes to different files like src/main/resources/com/lordofthejars/foo/file2.adoc and so on, with this approach you know where to find exactly the documentation of a part of your project/module (at same place as normal resources of your project). Basically I try to give the same treatment of documentation as anything on a project.

Now because I am embedding CSS there is no problem, but of course as ChrLipp suggested it could be a problem in near future if people finds more useful to not embed CSS.




If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Single-CSS-for-multiple-nested-adoc-files-tp552p577.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | http://google.com/profiles/dan.j.allen