[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] why prepend "file://" to abs paths in html output?
From: |
Nicolas Goaziou |
Subject: |
Re: [O] why prepend "file://" to abs paths in html output? |
Date: |
Sat, 08 Jul 2017 21:13:57 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Hello,
Carsten Dominik <address@hidden> writes:
> I think it can be useful to write file: in the org-mode file, to make a
> clear distinction from internal links. But once it is clear that something
> is a link to a file, I guess you are right that it might not be needed in
> HTML. We will see what breaks.....
Thinking about it, we should probably not remove the "file://" prefix.
I cannot think of any situation where [[/absolute/path/to/file]] would
match something like "<img src="/absolute/path/to/file"/>", because "/"
never matches web root directory.
IOW, to re-use the OP's example, [[/static/images/unicorn.jpg]] is never
a valid Org link, in the sense that it points to a non-existing file.
Since the OP is writing a link only valid during HTML export, he might
as well write raw HTML.
Note that that "file:///static/images/unicorn.jpg" is not useful either,
but at least it is logical.
The only situation where we might do something is during publishing,
when we know what web root directory – i.e., base directory – is. In
that case, we could replace absolute file names starting with web root
dir as root-relative URL.
WDYT?
Regards,
--
Nicolas Goaziou
- [O] why prepend "file://" to abs paths in html output?, Matt Price, 2017/07/07
- Re: [O] why prepend "file://" to abs paths in html output?, Nicolas Goaziou, 2017/07/08
- Re: [O] why prepend "file://" to abs paths in html output?, Kaushal Modi, 2017/07/08
- Re: [O] why prepend "file://" to abs paths in html output?, Nicolas Goaziou, 2017/07/08
- Re: [O] why prepend "file://" to abs paths in html output?, Carsten Dominik, 2017/07/08
- Re: [O] why prepend "file://" to abs paths in html output?,
Nicolas Goaziou <=
- Re: [O] why prepend "file://" to abs paths in html output?, Tim Cross, 2017/07/08
- Re: [O] why prepend "file://" to abs paths in html output?, Nicolas Goaziou, 2017/07/09
- Re: [O] why prepend "file://" to abs paths in html output?, Kaushal Modi, 2017/07/10
- Re: [O] why prepend "file://" to abs paths in html output?, Nicolas Goaziou, 2017/07/10
- Re: [O] why prepend "file://" to abs paths in html output?, Brett Viren, 2017/07/10
- Re: [O] why prepend "file://" to abs paths in html output?, Kaushal Modi, 2017/07/10
- Re: [O] why prepend "file://" to abs paths in html output?, Kaushal Modi, 2017/07/10
- Re: [O] why prepend "file://" to abs paths in html output?, Nicolas Goaziou, 2017/07/13
- Re: [O] why prepend "file://" to abs paths in html output?, Kaushal Modi, 2017/07/13
- Re: [O] why prepend "file://" to abs paths in html output?, Nicolas Goaziou, 2017/07/13