From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?=C5=81ukasz?= Stelmach Subject: portable absolute links in HTML export Date: Thu, 07 Oct 2010 14:21:57 +0200 Message-ID: <87tykyb3bu.fsf@dasa3.iem.pw.edu.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from [140.186.70.92] (port=50942 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P3pUt-00007R-PB for emacs-orgmode@gnu.org; Thu, 07 Oct 2010 08:22:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P3pU9-0003fp-55 for emacs-orgmode@gnu.org; Thu, 07 Oct 2010 08:22:10 -0400 Received: from lo.gmane.org ([80.91.229.12]:48647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P3pU8-0003f9-Qm for emacs-orgmode@gnu.org; Thu, 07 Oct 2010 08:22:09 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1P3pU6-0004GM-RC for emacs-orgmode@gnu.org; Thu, 07 Oct 2010 14:22:06 +0200 Received: from dasa3.iem.pw.edu.pl ([194.29.147.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 07 Oct 2010 14:22:06 +0200 Received: from lukasz.stelmach by dasa3.iem.pw.edu.pl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 07 Oct 2010 14:22:06 +0200 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: emacs-orgmode@gnu.org 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 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. The problem now looks like there should be separete _menu.org files 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? -- Miłego dnia, Łukasz Stelmach