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
:options-alist
(: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:
(setq
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>"))
)
- Ability to add logo to HTML export,
Vladimir Alexiev <=