From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: why prepend "file://" to abs paths in html output? Date: Thu, 13 Jul 2017 13:01:11 +0000 Message-ID: References: <87lgnz43qk.fsf@nicolasgoaziou.fr> <87h8yn3tsa.fsf@nicolasgoaziou.fr> <87bmou4u8a.fsf@nicolasgoaziou.fr> <874lumfqk7.fsf@gmail.com> <877ezh51ns.fsf@nicolasgoaziou.fr> <86y3rw2y1y.fsf@hierocles.phy.bnl.gov> <87eftkfr3n.fsf@nicolasgoaziou.fr> <871spkfqe1.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c0c8d127c2448055432878b" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVdkP-0005Av-7G for emacs-orgmode@gnu.org; Thu, 13 Jul 2017 09:01:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVdkB-0004Dq-Fq for emacs-orgmode@gnu.org; Thu, 13 Jul 2017 09:01:37 -0400 Received: from mail-lf0-x229.google.com ([2a00:1450:4010:c07::229]:36089) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVdkB-0004D0-8n for emacs-orgmode@gnu.org; Thu, 13 Jul 2017 09:01:23 -0400 Received: by mail-lf0-x229.google.com with SMTP id h22so36188849lfk.3 for ; Thu, 13 Jul 2017 06:01:22 -0700 (PDT) In-Reply-To: <871spkfqe1.fsf@nicolasgoaziou.fr> 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: Brett Viren , Carsten Dominik , Org Mode , Tim Cross --94eb2c0c8d127c2448055432878b Content-Type: text/plain; charset="UTF-8" On Thu, Jul 13, 2017 at 8:55 AM Nicolas Goaziou wrote: > Kaushal Modi writes: > > > Hmm. Thanks for that hint. Would it be OK to define backend-specific link > > abbreviations? > > I don't think so. > > Back-end are able to manipulate links the way they want without Org core > interfering. IOW, this black magick should operate whitin "ox-hugo.el" > itself, IMO. > I meant "Would it be OK to have ox-hugo.el define a link abbreviation like `hugo-static:' for the user?" That way, each user of ox-hugo.el does not have to do that in their configs. > BTW, I still don't understand why an export back-end (unlike an user) > would need to use link abbreviations. For static site generators like Hugo, Nikola, etc. it is conventional to dump all "static" attachments like images, code files, etc in a fixed "static/" (or something like that) in the blog structure. So it is very common to have all static links begin with "/path/to/blog/root/static/" for a blog. (That's exactly the #+HTML_LINK_ROOT I mentioned earlier.) -- Kaushal Modi --94eb2c0c8d127c2448055432878b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Jul 13= , 2017 at 8:55 AM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
Kaushal Modi <kaushal.modi@gmail.com> writes:

> Hmm. Thanks for that hint. Would it be OK to define backend-specific l= ink
> abbreviations?

I don't think so.

Back-end are able to manipulate links the way they want without Org core interfering. IOW, this black magick should operate whitin "ox-hugo.el&= quot;
itself, IMO.

I meant "Would it be = OK to have ox-hugo.el define a link abbreviation like `hugo-static:' fo= r the user?" That way, each user of ox-hugo.el does not have to do tha= t in their configs.
=C2=A0
BT= W, I still don't understand why an export back-end (unlike an user)
would need to use link abbreviations.

For s= tatic site generators like Hugo, Nikola, etc. it is conventional to dump al= l "static" attachments like images, code files, etc in a fixed &q= uot;static/" (or something like that) in the blog structure.=C2=A0

So it is very common to have all static links begin w= ith "/path/to/blog/root/static/" for a blog. (That's exactly = the #+HTML_LINK_ROOT I mentioned earlier.)
--

Kaushal Modi

--94eb2c0c8d127c2448055432878b--