mirror of https://github.com/yjwen/org-reveal.git
Merge pull request #473 from tinloaf/extra-scripts
Move extra scripts before initialize
This commit is contained in:
commit
844ef73957
20
ox-reveal.el
20
ox-reveal.el
|
@ -101,6 +101,7 @@
|
||||||
(:reveal-single-file nil "reveal_single_file" org-reveal-single-file t)
|
(:reveal-single-file nil "reveal_single_file" org-reveal-single-file t)
|
||||||
(:reveal-extra-script "REVEAL_EXTRA_SCRIPT" nil org-reveal-extra-script space)
|
(:reveal-extra-script "REVEAL_EXTRA_SCRIPT" nil org-reveal-extra-script space)
|
||||||
(:reveal-extra-script-src "REVEAL_EXTRA_SCRIPT_SRC" nil org-reveal-extra-script-src split)
|
(:reveal-extra-script-src "REVEAL_EXTRA_SCRIPT_SRC" nil org-reveal-extra-script-src split)
|
||||||
|
(:reveal-extra-script-before-src "REVEAL_EXTRA_SCRIPT_BEFORE_SRC" nil org-reveal-extra-script-before-src split)
|
||||||
(:reveal-init-options "REVEAL_INIT_OPTIONS" nil org-reveal-init-options newline)
|
(:reveal-init-options "REVEAL_INIT_OPTIONS" nil org-reveal-init-options newline)
|
||||||
(:reveal-highlight-css "REVEAL_HIGHLIGHT_CSS" nil org-reveal-highlight-css nil)
|
(:reveal-highlight-css "REVEAL_HIGHLIGHT_CSS" nil org-reveal-highlight-css nil)
|
||||||
(:reveal-reveal-js-version "REVEAL_REVEAL_JS_VERSION" nil nil t)
|
(:reveal-reveal-js-version "REVEAL_REVEAL_JS_VERSION" nil nil t)
|
||||||
|
@ -321,7 +322,12 @@ Example:
|
||||||
:type 'string)
|
:type 'string)
|
||||||
|
|
||||||
(defcustom org-reveal-extra-script-src '()
|
(defcustom org-reveal-extra-script-src '()
|
||||||
"Custom script source that will be embedded in a <script src> tag."
|
"Custom script source that will be embedded in a <script src> tag, after the call to Reveal.initialize()."
|
||||||
|
:group 'org-export-reveal
|
||||||
|
:type 'list)
|
||||||
|
|
||||||
|
(defcustom org-reveal-extra-script-before-src '()
|
||||||
|
"Custom script source that will be embedded in a <script src> tag, before the call to Reveal.initialize()."
|
||||||
:group 'org-export-reveal
|
:group 'org-export-reveal
|
||||||
:type 'list)
|
:type 'list)
|
||||||
|
|
||||||
|
@ -769,6 +775,18 @@ custom variable `org-reveal-root'."
|
||||||
;; plugin headings
|
;; plugin headings
|
||||||
(if-format "%s\n" (car reveal-4-plugin))
|
(if-format "%s\n" (car reveal-4-plugin))
|
||||||
|
|
||||||
|
;; Extra <script src="..."></script> tags before the call to Reveal.initialize()
|
||||||
|
(let ((before-src-list (let ((l (plist-get info :reveal-extra-script-before-src)))
|
||||||
|
;; map to a single string to a list.
|
||||||
|
(if (stringp l)
|
||||||
|
(list l)
|
||||||
|
l))))
|
||||||
|
(and before-src-list
|
||||||
|
(mapconcat (lambda (src) (format "<script src=\"%s\"></script>" src))
|
||||||
|
before-src-list
|
||||||
|
"\n")))
|
||||||
|
|
||||||
|
|
||||||
;; Reveal.initialize
|
;; Reveal.initialize
|
||||||
(let ((reveal-4-plugin-statement (cdr reveal-4-plugin))
|
(let ((reveal-4-plugin-statement (cdr reveal-4-plugin))
|
||||||
(init-options (plist-get info :reveal-init-options))
|
(init-options (plist-get info :reveal-init-options))
|
||||||
|
|
Loading…
Reference in New Issue