* 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
* Re: Ability to add logo to HTML export
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
0 siblings, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2023-03-24 11:54 UTC (permalink / raw)
To: Vladimir Alexiev; +Cc: emacs-orgmode
Vladimir Alexiev <vladimir.alexiev@ontotext.com> writes:
> 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>" -*-
If you have good ideas how to improve `org-html--build-pre/postamble',
patches welcome.
> 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>"
OPTION_S_ and you cannot have space after html-preamble: _
Try
#+OPTIONS: 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>"
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ 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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).