mirror of https://github.com/yjwen/org-reveal.git
Fixed #467. Support single string value of org-reveal-extra-script-src
This commit is contained in:
parent
2adca68b2b
commit
59adea8001
14
Readme.org
14
Readme.org
|
@ -805,11 +805,12 @@ This feature is turned off by default and needs to be switched on with ~org-reve
|
|||
|
||||
** Extra Stylesheets and Script Sources
|
||||
|
||||
Set =REVEAL_EXTRA_CSS= to a stylesheet file path to load extra custom
|
||||
styles after loading a theme.
|
||||
Set =REVEAL_EXTRA_CSS= to a stylesheet file path to load extra
|
||||
custom styles after loading a theme.
|
||||
|
||||
Set =REVEAL_EXTRA_SCRIPT_SRC` to script file path to load extra
|
||||
script sources.
|
||||
Set =REVEAL_EXTRA_SCRIPT_SRC= to script file path to load extra
|
||||
script sources. In case of multiple script files, specify each of
|
||||
them by one =REVEAL_EXTRA_SCRIPT_SRC= line.
|
||||
|
||||
#+BEGIN_SRC org
|
||||
,#+REVEAL_EXTRA_CSS: url-to-custom-stylesheet.css
|
||||
|
@ -817,7 +818,10 @@ This feature is turned off by default and needs to be switched on with ~org-reve
|
|||
#+END_SRC
|
||||
|
||||
Same setup can be done globally by customize variables
|
||||
~org-reveal-extra-css~ and ~org-reveal-extra-script-src~.
|
||||
~org-reveal-extra-css~ and ~org-reveal-extra-script-src~. In case
|
||||
of multiple script files, organize the script file names as a list
|
||||
and set ~org-reveal-extra-script-src~ to the list.
|
||||
|
||||
|
||||
** Select Built-In Scripts
|
||||
|
||||
|
|
|
@ -820,7 +820,11 @@ Reveal.initialize({
|
|||
;; Extra initialization scripts
|
||||
(or (plist-get info :reveal-extra-script) "")))
|
||||
;; Extra <script src="..."></script> tags
|
||||
(let ((src-list (plist-get info :reveal-extra-script-src)))
|
||||
(let ((src-list (let ((l (plist-get info :reveal-extra-script-src)))
|
||||
;; map to a single string to a list.
|
||||
(if (stringp l)
|
||||
(list l)
|
||||
l))))
|
||||
(and src-list
|
||||
(mapconcat (lambda (src) (format "<script src=\"%s\"></script>" src))
|
||||
src-list
|
||||
|
|
Loading…
Reference in New Issue