all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Ability to add logo to HTML export
@ 2023-03-23 16:14 Vladimir Alexiev
  2023-03-24 11:54 ` Ihor Radchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Vladimir Alexiev @ 2023-03-23 16:14 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1385 bytes --]

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):
[image: image.png]

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='./img/SemBSDD-Logo-400px.png'/></p>" -*-

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='./img/SemBSDD-Logo-400px.png'/></p>"

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>"))
)

[-- Attachment #1.2: Type: text/html, Size: 2236 bytes --]

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 55404 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-26 20:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-23 16:14 Ability to add logo to HTML export Vladimir Alexiev
2023-03-24 11:54 ` Ihor Radchenko
2023-03-24 13:43   ` Vladimir Alexiev
2023-03-24 14:06     ` Ihor Radchenko
2023-03-26 20:05       ` Vladimir Alexiev

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.