diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-05-16 10:13:12 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-05-16 10:13:12 +0000 |
commit | 6e16b3ab864e2d9ff2e6d3a00bf10f8dc7ca51a8 (patch) | |
tree | 07f06dc2091a3cf1d5d0ad4d2702921adec6e154 /doc/tips | |
parent | de7fa86f6692ae017293079b92f90631e2e4e261 (diff) | |
download | ikiwiki-6e16b3ab864e2d9ff2e6d3a00bf10f8dc7ca51a8.tar ikiwiki-6e16b3ab864e2d9ff2e6d3a00bf10f8dc7ca51a8.tar.gz |
web commit by KarlMW: hassle with usedirs and relative linking - probably solved
Diffstat (limited to 'doc/tips')
-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 |