diff --git a/Readme.org b/Readme.org index 35290dc..ef60d0f 100644 --- a/Readme.org +++ b/Readme.org @@ -6,7 +6,7 @@ #+REVEAL_TRANS: cube #+REVEAL_THEME: moon #+REVEAL_HLEVEL: 2 - +#+REVEAL_HEAD_PREAMBLE: #+REVEAL_PREAMBLE: my-preamble #+REVEAL_POSTAMBLE:

Created by yjwen.

@@ -286,6 +286,10 @@ $ git clone https://github.com/yjwen/org-reveal.git =REVEAL_PREAMBLE= and =REVEAL_POSTAMBLE=, as illustrated at the heading part of this document. + To add custom contents into HTML == parts, set contents to + variable =org-reveal-head-preamble= or option + =REVEAL_HEAD_PREAMBLE=. + *** Generating Pre/Postamble by Emacs-Lisp Functions If the contents of pre/postamble is the name of an evaluated diff --git a/ox-reveal.el b/ox-reveal.el index 86d62a8..c9014e1 100644 --- a/ox-reveal.el +++ b/ox-reveal.el @@ -55,6 +55,7 @@ (:reveal-mathjax nil "reveal_mathjax" org-reveal-mathjax t) (:reveal-mathjax-url "REVEAL_MATHJAX_URL" nil org-reveal-mathjax-url t) (:reveal-preamble "REVEAL_PREAMBLE" nil org-reveal-preamble t) + (:reveal-head-preamble "REVEAL_HEAD_PREAMBLE" nil org-reveal-head-preamble t) (:reveal-postamble "REVEAL_POSTAMBLE" nil org-reveal-postamble t) ) @@ -169,6 +170,11 @@ can be include." :group 'org-export-reveal :type 'string) +(defcustom org-reveal-head-preamble nil + "Preamble contents for head part." + :group 'org-export-reveal + :type 'string) + (defcustom org-reveal-postamble nil "Postamble contents." :group 'org-export-reveal @@ -566,6 +572,7 @@ info is a plist holding export options." (if-format "\n" (plist-get info :keywords)) (org-reveal-stylesheets info) (org-reveal-mathjax-scripts info) + (org-reveal--build-pre/postamble 'head-preamble info) " \n" (org-reveal--build-pre/postamble 'preamble info)