update for reveal.js>3.7.0: missing head.min.js not needed anymore

This commit is contained in:
admin@turbocafe.in.eu.org 2019-05-14 15:21:41 +03:00
parent 1cdd088ec5
commit 9a7eef5640
No known key found for this signature in database
GPG Key ID: 83FAA8F9D442012D
1 changed files with 1 additions and 8 deletions

View File

@ -611,23 +611,17 @@ using custom variable `org-reveal-root'."
"Return the necessary scripts for initializing reveal.js using
custom variable `org-reveal-root'."
(let* ((root-path (file-name-as-directory (plist-get info :reveal-root)))
(head-min-js (concat root-path "lib/js/head.min.js"))
(reveal-js (concat root-path "js/reveal.js"))
;; Local files
(local-root-path (org-reveal--file-url-to-path root-path))
(local-head-min-js (concat local-root-path "lib/js/head.min.js"))
(local-reveal-js (concat local-root-path "js/reveal.js"))
(in-single-file (plist-get info :reveal-single-file)))
(concat
;; reveal.js/lib/js/head.min.js
;; reveal.js/js/reveal.js
(if (and in-single-file
(file-readable-p local-head-min-js)
(file-readable-p local-reveal-js))
;; Embed scripts into HTML
(concat "<script>\n"
(org-reveal--read-file local-head-min-js)
"\n"
(org-reveal--read-file local-reveal-js)
"\n</script>")
;; Fall-back to extern script links
@ -636,10 +630,9 @@ custom variable `org-reveal-root'."
(error (concat "Cannot read "
(mapconcat 'identity
(delq nil (mapcar (lambda (file) (if (not (file-readable-p file)) file))
(list local-head-min-js local-reveal-js)))
(list local-reveal-js)))
", "))))
(concat
"<script src=\"" head-min-js "\"></script>\n"
"<script src=\"" reveal-js "\"></script>\n"))
;; plugin headings
"