From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: Org publish hierarchies and style variable Date: Wed, 29 Oct 2008 13:59:33 -0400 Message-ID: <873aifs2nu.fsf@gollum.intra.norang.ca> 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 1KvFKX-0006Jr-Tf for emacs-orgmode@gnu.org; Wed, 29 Oct 2008 13:59:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KvFKW-0006Jf-HQ for emacs-orgmode@gnu.org; Wed, 29 Oct 2008 13:59:40 -0400 Received: from [199.232.76.173] (port=33620 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvFKW-0006Jc-B7 for emacs-orgmode@gnu.org; Wed, 29 Oct 2008 13:59:40 -0400 Received: from mho-02-bos.mailhop.org ([63.208.196.179]:54558) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KvFKV-0005en-TQ for emacs-orgmode@gnu.org; Wed, 29 Oct 2008 13:59:40 -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: mdl@imapmail.org Cc: emacs-orgmode@gnu.org 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. I have lots of org files generating documents (some public, most not) at http://doc.norang.ca/ ,---- | Most of the public documents in doc.norang.ca have outdated | information but the 'How to use git' document might be of interest to | people on this mailing list. `---- I wrote a simple Python CGI script that picks up any HTML file in that directory and displays it on the index page. Each page uses the same CSS file. I have one entry for CSS which I share between all of my pages: ,----[ part of my org-publish-project-alist ] | ("doc-org" :base-directory "~/git/doc.norang.ca/" :publishing-directory "/ssh:www-data@www:~/doc.norang.ca/htdocs" :recursive t :section_numbers nil :table-of-contents nil :base-extension "org" :publishing-function org-publish-org-to-html :style "" :author-info nil :creator-info nil) | ("doc-css" :base-directory "~/git/doc.norang.ca/" :publishing-directory "/ssh:www-data@www:~/doc.norang.ca/htdocs" :base-extension "css" :publishing-function org-publish-attachment :recursive t :author nil) | ("doc" :components | ("doc-org" "doc-css")) `---- I create docs in subdirectories under http://doc.norang.ca/ and each document uses the css file in the root directory. All the documents use the same CSS file and therefore look the same. You could of course specify a fixed address for the stylesheet - there's no requirement to use relative addressing for your stylesheets at all (i.e. I could have replaced "/org.css" with "http://doc.norang.ca/org.css" and I'm free to use that stylesheet for any page (even stuff not in the doc.norang.ca domain) Feel free to steal it if you like it :) Maybe some of that is useful... -Bernt