diff --git a/Readme.org b/Readme.org index 6b1fd90..f934784 100644 --- a/Readme.org +++ b/Readme.org @@ -64,6 +64,7 @@ #+REVEAL: split:t - [[Preamble and Postamble][Preamble and Postamble]]([[https://github.com/yjwen/org-reveal#preamble-and-postamble][gh]]) - [[Generating Pre/Postamble by Emacs-Lisp Functions][Generating Pre/Postamble by Emacs-Lisp Functions]]([[https://github.com/yjwen/org-reveal#generating-pre/postamble-by-emacs-lisp-functions][gh]]) + - [[Prologue and Epilogue]]([[https://github.com/yjwen/org-reveal#prologue-and-epilogue][gh]]) - [[Raw HTML in Slides][Raw HTML in Slides]]([[https://github.com/yjwen/org-reveal#raw-html-in-slides][gh]]) - [[Speaker Notes][Speaker Notes]]([[https://github.com/yjwen/org-reveal#speaker-notes][gh]]) - [[Multiplexing][Multiplexing]]([[https://github.com/yjwen/org-reveal#multiplexing][gh]]) @@ -739,6 +740,16 @@ This feature is turned off by default and needs to be switched on with ~org-reve So you can embed the Emacs-Lisp function as an Org-Babel source block and mark it to be evaluated when exporting the document. +** Prologue and Epilogue + +Similar to preamble and postamble, arbitrary HTML contents can be +inserted between the opening ~
~ and ~
~ tags, +called prologue, and their closing counterparts, called epilogue. + +Specify those contents by options ~REVEAL_PROLOGUE~ and +~REVEAL_EPILOGUE~ for one buffer, or by variable ~org-reveal-prologue~ +and ~org-reveal-epilogue~ for global setup. + ** Raw HTML in Slides Besides the Org contents, you can embed raw HTML contents diff --git a/ox-reveal.el b/ox-reveal.el index 2793eb9..3bd9192 100644 --- a/ox-reveal.el +++ b/ox-reveal.el @@ -90,6 +90,8 @@ (:reveal-preamble "REVEAL_PREAMBLE" nil org-reveal-preamble t) (:reveal-head-preamble "REVEAL_HEAD_PREAMBLE" nil org-reveal-head-preamble newline) (:reveal-postamble "REVEAL_POSTAMBLE" nil org-reveal-postamble t) + (:reveal-prologue "REVEAL_PROLOGUE" nil org-reveal-prologue t) + (:reveal-epilogue "REVEAL_EPILOGUE" nil org-reveal-epilogue t) (:reveal-multiplex-id "REVEAL_MULTIPLEX_ID" nil org-reveal-multiplex-id nil) (:reveal-multiplex-secret "REVEAL_MULTIPLEX_SECRET" nil org-reveal-multiplex-secret nil) (:reveal-multiplex-url "REVEAL_MULTIPLEX_URL" nil org-reveal-multiplex-url nil) @@ -244,6 +246,16 @@ embedded into Reveal.initialize()." :group 'org-export-reveal :type 'string) +(defcustom org-reveal-prologue nil + "Prologue contents to be inserted between opening
and
." + :group 'org-export-reveal + :type 'string) + +(defcustom org-reveal-epilogue nil + "Prologue contents to be inserted between closing
and
." + :group 'org-export-reveal + :type 'string) + (defcustom org-reveal-slide-header nil "HTML content used as Reveal.js slide header" :group 'org-export-reveal @@ -1396,8 +1408,9 @@ info is a plist holding export options." " \n" (org-reveal--build-pre/postamble 'preamble info) - "
-
\n" + "
\n" + (org-reveal--build-pre/postamble 'prologue info) + "
\n" ;; Title slides (let ((title-slide (plist-get info :reveal-title-slide))) (when (and title-slide (not (plist-get info :reveal-subtree))) @@ -1438,8 +1451,9 @@ info is a plist holding export options." (when footer (format "
%s
\n" footer)))) "\n")))) contents - "
-
\n" + "
\n" + (org-reveal--build-pre/postamble 'epilogue info) + "
\n" (org-reveal--build-pre/postamble 'postamble info) (org-reveal-scripts info) "