From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: Org publish hierarchies and style variable Date: Wed, 29 Oct 2008 19:40:47 +0100 Message-ID: <87hc6v453k.fsf@kassiopeya.MSHEIMNETZ> References: <87d4hj9zvm.fsf@fastmail.fm> 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 1KvF02-000804-JG for emacs-orgmode@gnu.org; Wed, 29 Oct 2008 13:38:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KvF01-0007zo-4E for emacs-orgmode@gnu.org; Wed, 29 Oct 2008 13:38:30 -0400 Received: from [199.232.76.173] (port=48080 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvF00-0007zl-VF for emacs-orgmode@gnu.org; Wed, 29 Oct 2008 13:38:28 -0400 Received: from mail.gmx.net ([213.165.64.20]:53435) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KvEzz-0007sq-V5 for emacs-orgmode@gnu.org; Wed, 29 Oct 2008 13:38:28 -0400 In-Reply-To: <87d4hj9zvm.fsf@fastmail.fm> (mdl@imapmail.org's message of "Wed, 29 Oct 2008 10:37:01 -0500") 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: emacs-orgmode@gnu.org Hi Matt, I can see no problem with the alternative you provide here. It's nice IMHO. How much space will a stylesheet take? One block, sometimes 2 - not very much. Thanks for pointing this out. There is the per file #+STYLE: setting. We should mention those alternatives in the tutorial. * Why I recommended the #+SETUPFILE option in the tutorial When moving files around, not only the path to the stylesheet is affected, but also paths to scripts, or PHP/Perl/whatever libraries and includes (which may live in the #+TEXT: line of a level file). I have 106 files and directories currently, constantly growing. And the head of the all the files just looks like this: #+SETUPFILE: ~/emacs/org/levels/level-1.org #+TITLE: Some Title Moving the file, just means to change one character (`1'), and the scripts, stylesheets, and all the rest still works. I use 6 level files for 3 levels (more to come): - 1 for startpage (No `Up' link, `Home' leads to my local homepage), - 2 for directory indexes (where `Up' means go to '../index.html', `Home' to my `sitemap.html'), - 3 for all the other files (where `Up' goes to 'index.html', `Home' to my `sitemap.html'). Images in stylesheets ('background-image:url(.....)') are resolved realtive to the stylesheets location. We should be able to add a '' line ;-) Regards, Sebastian mdl@imapmail.org writes: > A question: The org-publish tutorial recommends the use of template > files for setting the relative link to the stylesheet for nested > directories to be published to html. > > - http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.php > > E.g., > > For first level directories such as > > ~/org/ > |- css/ > | |- stylesheet.css > |- index.org > |- Emacs > | |- index.org > > ~/org/Emacs/index.org would contain the following: > > #+SETUPFILE: ~/.emacs.d/level-1.org > > which points to a setupfile with the option: > > #+STYLE: href="../stylesheet.css" /> > > My question: Instead of this method, which I find a little tedious, > I've created a hardlink to the master css directory in each > subdirectory of my project. As a result the, css files get copied to > each subdirectory in my public web directory and I only need to > specify a single style option in my org-publish-alist. > > Apart from taking up extra disk space on the server (and thus being > less economical), are there any other potential problems with this > approach? I'm using org as a wiki and have a lot of org files in each > subdirectory. This approach seems easier than having to add and tweak > the SETUPFILE option for each new org file. -- Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover Tel.: +49 (0)511 - 36 58 472 Fax: +49 (0)1805 - 233633 - 11044 mobil: +49 (0)173 - 83 93 417 Http: www.emma-stil.de