From 161f2e16dced74ab91323494519dc35893139b39 Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Wed, 25 Nov 2020 12:19:38 +0100 Subject: [PATCH] video tag => allows html export for mp4 videos --- doom.org | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/doom.org b/doom.org index a551b56..f1510bb 100644 --- a/doom.org +++ b/doom.org @@ -793,6 +793,22 @@ Do not export headline with the =:ignore:= tag: ) #+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 "" 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 - [ ] https://github.com/alhassy/emacs.d - [ ] https://github.com/alphapapa/unpackaged.el#export-to-html-with-useful-anchors