Make sure :html-pre/postamble can insert the output of a custom function.
This function must have no argument and must output a string to be inserted in the HTML export. Thanks to Sander Boer for pointing at this.
This commit is contained in:
parent
f3e563476b
commit
3482284bbd
10
doc/org.texi
10
doc/org.texi
|
@ -9766,10 +9766,14 @@ The HTML exporter lets you define a preamble and a postamble.
|
||||||
|
|
||||||
The default value for @code{org-export-html-preamble} is @code{t}, which
|
The default value for @code{org-export-html-preamble} is @code{t}, which
|
||||||
means that the preamble is inserted depending on the relevant formatting
|
means that the preamble is inserted depending on the relevant formatting
|
||||||
string in @code{org-export-html-preamble-format}. Setting
|
string in @code{org-export-html-preamble-format}.
|
||||||
@code{org-export-html-preamble} to a string will override the default
|
|
||||||
|
Setting @code{org-export-html-preamble} to a string will override the default
|
||||||
formatting string. Setting it to a function, will insert the output of the
|
formatting string. Setting it to a function, will insert the output of the
|
||||||
function. Setting to @code{nil} will not insert any preamble.
|
function, which must be a string; such a function takes no argument but you
|
||||||
|
can check against the value of @code{opt-plist}, which contains the list of
|
||||||
|
publishing properties for the current file. Setting to @code{nil} will not
|
||||||
|
insert any preamble.
|
||||||
|
|
||||||
The default value for @code{org-export-html-postamble} is @code{'auto}, which
|
The default value for @code{org-export-html-postamble} is @code{'auto}, which
|
||||||
means that the HTML exporter will look for the value of
|
means that the HTML exporter will look for the value of
|
||||||
|
|
|
@ -1335,7 +1335,7 @@ lang=\"%s\" xml:lang=\"%s\">
|
||||||
(format-spec html-pre `((?t . ,title) (?a . ,author)
|
(format-spec html-pre `((?t . ,title) (?a . ,author)
|
||||||
(?d . ,date) (?e . ,email)))))
|
(?d . ,date) (?e . ,email)))))
|
||||||
((functionp html-pre)
|
((functionp html-pre)
|
||||||
(funcall html-pre opt-plist))
|
(funcall html-pre))
|
||||||
(t
|
(t
|
||||||
(insert
|
(insert
|
||||||
(format-spec
|
(format-spec
|
||||||
|
@ -1768,7 +1768,7 @@ lang=\"%s\" xml:lang=\"%s\">
|
||||||
(?v . ,html-validation-link))))
|
(?v . ,html-validation-link))))
|
||||||
(insert "</div>"))
|
(insert "</div>"))
|
||||||
((functionp html-post)
|
((functionp html-post)
|
||||||
(funcall html-post opt-plist))
|
(funcall html-post))
|
||||||
((eq html-post 'auto)
|
((eq html-post 'auto)
|
||||||
;; fall back on default postamble
|
;; fall back on default postamble
|
||||||
(insert "<div id=\"postamble\">\n")
|
(insert "<div id=\"postamble\">\n")
|
||||||
|
|
Loading…
Reference in New Issue