From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: portable absolute links in HTML export Date: Thu, 7 Oct 2010 14:38:15 +0200 Message-ID: References: <87tykyb3bu.fsf@dasa3.iem.pw.edu.pl> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=58682 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P3pl1-0002Bz-Ds for emacs-orgmode@gnu.org; Thu, 07 Oct 2010 08:39:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P3pkz-0000yk-TN for emacs-orgmode@gnu.org; Thu, 07 Oct 2010 08:39:35 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:52266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P3pkz-0000yQ-JV for emacs-orgmode@gnu.org; Thu, 07 Oct 2010 08:39:33 -0400 Received: by ewy4 with SMTP id 4so45229ewy.0 for ; Thu, 07 Oct 2010 05:39:32 -0700 (PDT) In-Reply-To: <87tykyb3bu.fsf@dasa3.iem.pw.edu.pl> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?UTF-8?Q?=C5=81ukasz_Stelmach?= Cc: emacs-orgmode@gnu.org On Oct 7, 2010, at 2:21 PM, =C5=81ukasz Stelmach wrote: > Hello. > > Is there a simple way to create hyperlinks with *absolute* paths that > would work after both: simple file export (C-c C-e h) and publishing =20= > on > a remote server (C-c C-e F). I'd like to create a _menu.org file that > contains some navigation links and #+INCLUDE: it (BTW. M-Tab can't > complete #+INC) in every single file I create and publish. Maybe you can use link abbreviations and define the abbreviation =20 differently for both cases. - Carsten > > The problem now looks like there should be separete _menu.org files =20= > for > each directory if I want to use relative paths in the menu links, that > work after local (C-c C-e h) and remote (C-c C-e h) export. When I put > absolute paths that work on > > Let's say I've got a structure like this > > ~/WWW/index.org > ~/WWW/_menu.org > ~/stuff/index.org > ~/things/index.org > ~/problems/index.org > > after publishing the index.org files are available at: > > http://example.com/~stl/ > http://example.com/~stl/stuff/ > http://example.com/~stl/things/ > http://example.com/~stl/problems/ > > respectively. > > The _menu.org that works in the main index.org looks like this: > > + [[file:index.org][Home]] > + [[file:stuff/index.org][Stuff]] > + [[file:things/index.org][Things]] > + [[file:problems/index.org][Problems]] > > But when I #+INCLUDE it in the stuff/index.org file the links point at > > http://example.com/~stl/stuff/index.html > http://example.com/~stl/stuff/stuff/index.html > http://example.com/~stl/stuff/things/index.html > http://example.com/~stl/stuff/problems/index.html > > On the other hand if I replace file: links with absolute http: ones I > won't be able to navigate between the HTML files created locally with > C-c C-e h. > > + [[http://example.com/~stl/index.org][Home]] > + [[http://example.com/~stl/stuff/index.org][Stuff]] > + [[http://example.com/~stl/things/index.org][Things]] > + [[http://example.com/~stl/problems/index.org][Problems]] > > Is there any "secret" way to overcome such a problem? > > --=20 > Mi=C5=82ego dnia, > =C5=81ukasz Stelmach > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten