From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?U8OpYmFzdGllbiBCcmlzYXJk?= Subject: Re: Binding org-html-head to a function? Date: Sat, 31 Jan 2015 14:22:02 +0100 Message-ID: <54CCD6FA.2060400@m4x.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHY04-0003N1-On for emacs-orgmode@gnu.org; Sat, 31 Jan 2015 08:22:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YHY01-0003Ps-GC for emacs-orgmode@gnu.org; Sat, 31 Jan 2015 08:22:12 -0500 Received: from mx1.polytechnique.org ([129.104.30.34]:60428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHY01-0003Ph-Af for emacs-orgmode@gnu.org; Sat, 31 Jan 2015 08:22:09 -0500 Received: from pc6.home (AAubervilliers-651-1-123-172.w86-198.abo.wanadoo.fr [86.198.38.172]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTPSA id EC0A914000637 for ; Sat, 31 Jan 2015 14:22:04 +0100 (CET) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi Rasmus, > Hi S=C3=A9bastien, > > S=C3=A9bastien Brisard writes: > > >/ my blog (sbrisard.github.io) is entirely written with/ > >/ org-mode./ > > Looks pretty. Thanks! > > >/ Org-mode offers everything I need, except for one minor/ > >/ detail. It is very difficult to include the same CSS file in the/ > >/ html-head of several files located at various levels of the directo= ry/ > >/ hierarchy./ > >/ I do not really like this trick/ > >/ http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.htm= l#sec-6./ > >/ For/ > >/ the time being, I configured several projects (one for each level),= / > >/ seehttps://github.com/sbrisard/blog/blob/master/sb-blog.el. But I a= m/ > >/ not happy with this solution either./ > >/ I think that it would be great if org-html-head and/ > >/ org-html-head-extra behaved as org-html-preamble and/ > >/ org-html-postamble, which can be set to either a string, or a/ > >/ function. This offers great flexibility for the configuration of th= e/ > >/ pre/postamble (I use it to conditionnaly include DISQUS comments in= / > >/ the postamble)./ > >/ Would it be possible to mimick the same behavior with org-html-head= / > >/ and org-html-head-extra? Or would this be too much work?/ > > You could use macros: > > #+MACRO: my-style (eval (concat "#+HTML_HEAD_EXTRA: " (if t "