emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: David O'Toole <dto@gnu.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: configurable link export
Date: Mon, 22 May 2006 11:22:44 +0200	[thread overview]
Message-ID: <2301523295d062f63acce8cebd734108@science.uva.nl> (raw)
In-Reply-To: <m3psi8alyz.fsf@gnu.org>


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:user@host:~/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

  parent reply	other threads:[~2006-05-22  9:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-19 19:33 configurable link export Austin Frank
2006-05-20 11:01 ` Carsten Dominik
2006-05-20 13:01   ` David O'Toole
2006-05-21 15:02     ` Austin Frank
2006-05-22  9:22     ` Carsten Dominik [this message]
2006-05-21 15:02   ` Austin Frank

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2301523295d062f63acce8cebd734108@science.uva.nl \
    --to=dominik@science.uva.nl \
    --cc=dto@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).