emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Richard Riley <rileyrgdev@googlemail.com>
To: Sebastian Rose <sebastian_rose@gmx.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: Org publish hierarchies and style variable
Date: Thu, 30 Oct 2008 16:06:57 +0100	[thread overview]
Message-ID: <k5zlkm6s1a.fsf@development.richardriley.net> (raw)
In-Reply-To: <87skqe5cvr.fsf@kassiopeya.MSHEIMNETZ> (Sebastian Rose's message of "Thu, 30 Oct 2008 16:19:36 +0100")

Sebastian Rose <sebastian_rose@gmx.de> writes:

> Richard Riley <rileyrgdev@gmail.com> writes:
>> I don't know if things have barreled  along so quickly that this is more
>> patching and sticking plaster than a solid solution but it works well for
>> me.
>
> That's the important thing: it has to work for you ;-)
>
> That's why I stick with the 'level-files' solution. This way it works
> without any server-side scripting, postprocessing, networking and simply
> on each and ervery host. Even when accessed through the file: protocol
> localy. All I need is emacs and a webbrowser to browse my notes or test
> publishing.

I think cascading stylesheets using relative file notation provide the
same benefit. Note "think" since its been a while since I implemented my
org solution for my small web.
>
> But it is indeed tailored to my needs: note-taking.
>
> To do fancy stuff, we may use the either :style in
> org-publish-projects-alist or the corresponding #+STYLE: file-variable
> (e.g. in a level-file), to add arbitrary stuff to the head section. I'll
> just use the #+STYLE: option for readability.

You need to add it to each file if its a file specific style - that's
fine. But that can mix with the cascaded style method I suggested. The
benefit of the simple method I outlined is that you still (or already)
also have a specific style sheet for the project level or directory
too. A good place to add sub web specific look and feel should you want.

>
>
> An other solution to use only one stylesheet, and be able to move files
> around (not working through the file: protocol or without network, just
> as Bernt's setup):
>
> #+STYLE: <base href="http://host.domain.tld" />

Assuming it is a web specific style this is not necessary using cascades
as I outlined and which also works with out "real host" testing. I can
see this being possibly necessary when you want to borrow other peoples
styles however.

>
> If Php is supported on all hosts, you may use the next snippet, to make
> it portable (publish on several hosts without changing anything):
>
> :#+STYLE: <?php
> :#+STYLE: echo '<base href="http://' . $_SERVER['SERVER_NAME'] . '" />';
> :#+STYLE: ?>
>
>
> That way _all_ the URLs in stylesheets
> (background-image:url(images/foo.gif)), image tags, hyperlinks etc. are
> resolved relative to http://host.domain.tld.

This has further ramifications I think. Namely including things
relative. e.g sub dir in a web http:/web/proj1. Normally if I do not
provide a full URL I want it relative. e.g "url:./images/proj1.jpg"

>
>
> See http://www.w3.org/TR/REC-html40/struct/links.html#h-12.4 for details how
> links are resolved when using the base element (HTML 4.0 is the basis for
> XHTML 1.0 strict).
>
>
>
> Regards,
>
>    Sebastian

-- 
 important and urgent problems of the technology of today are no longer the satisfactions of the primary needs or of archetypal wishes, but the reparation of the evils and damages by the technology of yesterday.  ~Dennis Gabor, Innovations:  Scientific, Technological and Social, 1970

  reply	other threads:[~2008-10-30 15:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-29 15:37 Org publish hierarchies and style variable mdl
2008-10-29 17:59 ` Bernt Hansen
2008-10-30  3:00   ` Matthew Lundin
2008-10-30 10:38     ` Richard Riley
2008-10-30 15:19       ` Sebastian Rose
2008-10-30 15:06         ` Richard Riley [this message]
2008-10-30 17:32           ` Sebastian Rose
2008-10-30 17:04             ` Richard Riley
2008-10-29 18:40 ` Sebastian Rose
2008-10-29 18:59 ` Sebastian Rose

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=k5zlkm6s1a.fsf@development.richardriley.net \
    --to=rileyrgdev@googlemail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=sebastian_rose@gmx.de \
    /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).