diff options
Diffstat (limited to 'doc/tips/switching_to_usedirs/discussion.mdwn')
-rw-r--r-- | doc/tips/switching_to_usedirs/discussion.mdwn | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/tips/switching_to_usedirs/discussion.mdwn b/doc/tips/switching_to_usedirs/discussion.mdwn new file mode 100644 index 000000000..e8c153ae4 --- /dev/null +++ b/doc/tips/switching_to_usedirs/discussion.mdwn @@ -0,0 +1,14 @@ +I'm working on an asciidoc plugin and having a problem figuring out how to deal with usedirs. + +One of the key reasons I use asciidoc is for the ability to do inline includes of scripts with syntax-highlighting. I also want the script to be linked from the page for easy downloading. + +Formerly, I would have had the asciidoc and the script in the same directory, and all was well (and I have my asciidoc plugin working just fine for this). With usedirs, the script needs to be in the same dir as the asciidoc source at render time, but in the newly created subdir for download. The problem is that the page effectively moves down by one directory level when it is rendered from the source to the html tree. + +As far as my needs are concerned, there is no problem - I can just run without usedirs - but it would be nice to find a solution that would work either way. Just a clean solution to usedirs would be fine (even if it doesn't work without usedirs), since usedirs is now the default. + +------ +OK, now that I've written this out, I see a solution. The include for the syntax-highlighting and the link to the script are not tightly coupled (in fact they're not coupled at all, except by the person writing the page). So, the solution under usedirs is to specify a current-dir link to the script for the syntax-highlighter, and a parent-dir link for the script. This could even be made conditional on usedirs being enabled, if one felt so inclined. + +I'll leave this ramble here in case anyone has anything to say about it. Thank you for listening :-) + +-- KarlMW
\ No newline at end of file |