Login  Register

How can I make asciidoctor links dynamic to the file system?

Posted by documentationchronicles on Apr 20, 2019; 4:40pm
URL: https://discuss.asciidoctor.org/How-can-I-make-asciidoctor-links-dynamic-to-the-file-system-tp6860.html

Hi there. I have asciidoctor notes in my hard disk and I am regularly switching different operating systems for my needs. The problem is my links are static and adjusted for the Ubuntu file system.

/media/X/Notes/.../ Y.adoc

The problem arises when I switch Windows. The windows file path is like the following and I cannot reach proper page location when I click asciidoctor links.
   
E:\Notes\...\Y.adoc


Relative links only work when the pointer file above the directory of the pointed file.


│   │   ├─── Notes(Folder)
│   │   │   └───X.adoc
│   │   │   ├─── Calculus 1(Folder)
│   │   │   │   └───Y.adoc

For example, I can point from X.adoc to Y.adoc with relative URL(./Calculus1/Y.adoc#abc) but I cannot point from
 Y.adoc to X.adoc with relative URL without knowing the absolute file path.