[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Re: Org publish hierarchies and style variable
From: |
Richard Riley |
Subject: |
Re: [Orgmode] Re: Org publish hierarchies and style variable |
Date: |
Thu, 30 Oct 2008 16:06:57 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Sebastian Rose <address@hidden> writes:
> Richard Riley <address@hidden> 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