From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Riley Subject: Re: Re: Org publish hierarchies and style variable Date: Thu, 30 Oct 2008 16:06:57 +0100 Message-ID: References: <87d4hj9zvm.fsf@fastmail.fm> <873aifs2nu.fsf@gollum.intra.norang.ca> <87skqe5cvr.fsf@kassiopeya.MSHEIMNETZ> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KvZ7A-0003rC-OE for emacs-orgmode@gnu.org; Thu, 30 Oct 2008 11:07:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KvZ7A-0003qN-9A for emacs-orgmode@gnu.org; Thu, 30 Oct 2008 11:07:12 -0400 Received: from [199.232.76.173] (port=51930 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvZ7A-0003qB-6p for emacs-orgmode@gnu.org; Thu, 30 Oct 2008 11:07:12 -0400 Received: from fg-out-1718.google.com ([72.14.220.157]:39829) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KvZ78-0008A7-K5 for emacs-orgmode@gnu.org; Thu, 30 Oct 2008 11:07:12 -0400 Received: by fg-out-1718.google.com with SMTP id l26so568148fgb.30 for ; Thu, 30 Oct 2008 08:07:04 -0700 (PDT) In-Reply-To: <87skqe5cvr.fsf@kassiopeya.MSHEIMNETZ> (Sebastian Rose's message of "Thu, 30 Oct 2008 16:19:36 +0100") 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: Sebastian Rose Cc: emacs-orgmode@gnu.org Sebastian Rose writes: > Richard Riley 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: 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: :#+STYLE: echo ''; > :#+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