[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Ability to add logo to HTML export

From: Vladimir Alexiev
Subject: Ability to add logo to HTML export
Date: Thu, 23 Mar 2023 18:14:25 +0200

Some projects have a logo, which one may want to add to the beginning of a HTML document.
Eg like this (before authors and Title):

Right now I have to resort to a bad kludge to do that: a local variable in the org file:

#+comment: -*- org-html-preamble: "<p class='author'>Author: %a<br/>(%e)</p><p class='date'>Date: %d</p><p><img src="" -*-

And also this in my org setup:

(put 'org-html-preamble 'safe-local-variable 'stringp)

I looked at

(org-export-define-backend 'html
    (:html-preamble nil "html-preamble" org-html-preamble)

and the help for org-export-options-alist:
this word "html-preamble" corresponds to:

OPTION is a string that could be found in an #+OPTIONS: line.

So I tried this, but it had no effect"

#+OPTION: html-preamble: "<p class='author'>Author: %a<br/>(%e)</p><p class='date'>Date: %d</p><p><img src="">

Minor note: normally, I distribute the standard variables between preamble and postamble as follows:

 org-html-preamble-format '(("en" "<p class=\"author\">Author: %a (%e)</p>
<p class=\"date\">Date: %d</p>"))
 org-html-postamble t                   ; was 'auto which inserts author, date: but I want those in preamble
 org-html-postamble-format  '(("en" "<p class=\"creator\">Exported by %c</p>
<p class=\"validation\">%v</p>"))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]