From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brett Viren Subject: Re: why prepend "file://" to abs paths in html output? Date: Mon, 10 Jul 2017 09:58:49 -0400 Message-ID: <86y3rw2y1y.fsf@hierocles.phy.bnl.gov> References: <87lgnz43qk.fsf@nicolasgoaziou.fr> <87h8yn3tsa.fsf@nicolasgoaziou.fr> <87bmou4u8a.fsf@nicolasgoaziou.fr> <874lumfqk7.fsf@gmail.com> <877ezh51ns.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUa8g-0005uZ-Ty for emacs-orgmode@gnu.org; Mon, 10 Jul 2017 10:58:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUa8c-0004sM-47 for emacs-orgmode@gnu.org; Mon, 10 Jul 2017 10:58:19 -0400 Received: from smtpout4.bnl.gov ([130.199.3.132]:39721 helo=smtpgw.bnl.gov) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1dUa8b-0004s0-ST for emacs-orgmode@gnu.org; Mon, 10 Jul 2017 10:58:14 -0400 In-Reply-To: <877ezh51ns.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Sun, 09 Jul 2017 12:45:43 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: Carsten Dominik , Tim Cross , Org Mode , Kaushal Modi --=-=-= Content-Type: text/plain Hi Nicolas, Nicolas Goaziou writes: > So, basically, upon exporting the following document to HTML: > > #+html_link_root: /tmp/ > [[/tmp/unicorn.jpg]] > > the link becomes > > unicorn.jpg Is this saying "subtract the value of 'html_link_root' from the Org link to make its URL"? If so, I think this would not be general enough to help some cases. For example, with Nikola+orgmode and with Nikola's "pretty URLs" option the relative location between either the Org source or its generated HTML and an image that they both link will differ. Some details: Nikola source wants this layout: /path/to/my/nikola/posts/my-blog-post.org /path/to/my/nikola/images/unicorn.jpg The Org source generates to HTML which will be found at this URL path: /mysiteroot/posts/my-blog-post/index.html So, right now, either the Org link to the image must be written to be invalid (for Org): [[../../images/unicorn.jpg]] Or, some mechanism needs to turn the valid Org link: [[../images/unicorn.jpg]] into either: or: I guess I could use html_link_root set to "/path/to/my/nikola" but then my Org source loses portability. I think better would be able to explicitly state the desired URL path for the HTML like: #+html_url_path: /mysiteroot/images/unicorn.jpg [[../images/unicorn.jpg]] -Brett. PS: imo, in this example, I think the real solution is to make Nikola allow for keeping org+img source together and to output org+img+html all together in one web directory. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJZY4gaAAoJEFsAceCXpRtHFuEQAIL5mdDmq5KqRmZK+uJrdCKc F610bUCG62/bJ8aRhcQVpAtVFHFJfXMJ4SC1xBdgtukGshibeWvJ7B9J1QZXgecY gwuBsr8WVOBE+6kFogK/CQ6lct8Ecd+lhyeMyWsfJLIMGkCECR5CGUhVFEN/udBE egKYZoglpD2KRgz/xHxBMzJlpCNXpz3Ev8mBSe6+hY11PbMyxbyEQMb07gBuxHlu mxVfw+zsoV+OE1FVduaeO8ojsn9yEYrjjqggMtKsCsoQFuCZbuoA8T2GnOKkriIU KhdE4LVxtEon4ZI2HLPBf1ZWO2T9RT8JwBIlXN80zfADP/txpgHhRX/48yuAVjLG 8JVZGrPF2vTt8qZkhwoF1kOnmUCSZPaShDG7ns4cp0RDmYCwdiF1zKthq21qWSe7 TU+kaGfn6ubWtfCrUQTs9ZIcPTtBgzspka8cKvumI8HeL+t56KmYJMPLt0sVRGho K3Hrr3jE62w6b0BFf+pCqGq87VFOk4Ic2k20qIXwHrYFLuv3FBAtYMusXmoNKAyz 4czKMhAr93P4ALhPAVUDXN0CIWzchjYEWcV1Q+BOib/PwdSkwaAdSPLrWaJe70q9 QAwQZyA33reLHIzZnAIgBLZzFHsI/L7B5iOT+n5uLt4C6Fikd3xHLRabZ3+sD/YT 7lJwbsVgsdbrnb0u6VnA =V+gv -----END PGP SIGNATURE----- --=-=-=--