[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-orgmode] configurable link export

From: Carsten Dominik
Subject: Re: [Emacs-orgmode] configurable link export
Date: Mon, 22 May 2006 11:22:44 +0200

On May 20, 2006, at 15:01, David O'Toole wrote:
I have been thinking about inter-file links in preparation for
implementing some of the more advanced features for org-publish (page
rewriting, sitemap generation, etc) and I think this will be very
simple to straighten out.

All we need is for people to specify a property called :link-base that
is the prefix for a URL. For example, if :publishing-directory is
"/ssh:address@hidden:~/public_html/images", the user should probably set
the :link-base to "/images" or "http://foosite.org/images";

Given this one extra piece of information, then it is a simple matter
for the :link-transform function to actually generate proper URLs
(instead of simply validating them.) This would free projects from the
requirement that the web server must have the exact same directory
layout as your local project files.

I don't quite understand yet how this will allow you to generate a different directory structure on the server. Yes, within one project component this would allow you to use absolute path names for links. But if I am in an org-mode file and I am linking to "../../images/David.jpg", at least the current component does not know where the link files will end up.

My approach would have been the following:
1. Yes, enforce the same directory structure on the server. I think this makes a lot of sense anyway.

2. When publishing a project, make a list of all files published by this project, including source files, images, you name it. Cache that list somewhere during the publishing process.

3. Check any queries for safe links against this list.

As far as I can see this would remove the need to do *any* further customization. Or am I overlooking something?

But it is also quite possible that I simply have not fully understood your idea about handling this.

- Carsten

reply via email to

[Prev in Thread] Current Thread [Next in Thread]