video tag => allows html export for mp4 videos
This commit is contained in:
parent
05356ff6d9
commit
a259c59f2f
16
doom.org
16
doom.org
@ -793,6 +793,22 @@ Do not export headline with the =:ignore:= tag:
|
|||||||
)
|
)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
*** MP4 Video - =video= link
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defun org-video-link-export (path desc backend)
|
||||||
|
(let ((ext (file-name-extension path)))
|
||||||
|
(cond
|
||||||
|
((eq 'html backend)
|
||||||
|
(format "<video preload='metadata' controls='controls'><source type='video/%s' src='%s' /></video>" ext path))
|
||||||
|
;; fall-through case for everything else
|
||||||
|
(t
|
||||||
|
path))))
|
||||||
|
|
||||||
|
(org-link-set-parameters "video" :export 'org-video-link-export)
|
||||||
|
|
||||||
|
(org-export-string-as "video:xxx.mp4" 'html t)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
*** TODO Ensuring useful HTML Anchors
|
*** TODO Ensuring useful HTML Anchors
|
||||||
- [ ] https://github.com/alhassy/emacs.d
|
- [ ] https://github.com/alhassy/emacs.d
|
||||||
- [ ] https://github.com/alphapapa/unpackaged.el#export-to-html-with-useful-anchors
|
- [ ] https://github.com/alphapapa/unpackaged.el#export-to-html-with-useful-anchors
|
||||||
|
Loading…
Reference in New Issue
Block a user