I'm exporting an org file to HTML that will live at
http://example.com/foo/bar.html and also at
http://another.url/a/b/c.html. I'd like to write some org syntax that exports links to other files on the same server.
Case 1. I want to link to another file in the same directory. How do I get output
[[data.txt][lore]]--> error "Unable to resolve link"
<a href="./data.txt">lore</a>- good enough
Case 2. I want to link to a file in the root directory. How do I get output
<a href="file:///robots.txt">skynet</a>, not what I want
<a href="../../robots.txt">skynet</a>- works only if I know how many levels up
Is there a direct way to output
/robots.txt as the link without getting
file:// prepended, and without having to use
../ as workarounds?
I see a different workaround on this question but the function mentioned there,
org-add-link-type, is marked Obsolete in org 9.0, and it's not obvious to me how to use
org-link-set-parameters for this.