diff --git a/ox-reveal.el b/ox-reveal.el
index 879e030..e829b69 100644
--- a/ox-reveal.el
+++ b/ox-reveal.el
@@ -746,15 +746,16 @@ dependencies: [
file name. If in single file mode, the \n")
- ;; Cannot read fname, just error out
- (error (concat "Cannot generate single file presentation due to "
- fname
- " is not readable")))
+ (let ((local-fname (org-reveal--file-url-to-path fname)))
+ (if (file-readable-p local-fname)
+ ;; Embed script into HTML
+ (concat "\n")
+ ;; Cannot read fname, just error out
+ (error (concat "Cannot generate single file presentation due to "
+ local-fname
+ " is not readable"))))
(format "\n" fname)))
(defun org-reveal--script-tags-by-auto-file-names (fnames in-single-file)