Add yt link => works for html and markdown
This commit is contained in:
parent
a259c59f2f
commit
9058a3d9d3
27
doom.org
27
doom.org
@ -1511,6 +1511,33 @@ https://www.reddit.com/r/emacs/comments/d3a8or/pretty_org_tables_in_the_buffer_c
|
|||||||
)
|
)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** Org Links
|
||||||
|
*** Youtube Links
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(setq yt-iframe-format
|
||||||
|
;; You may want to change your width and height.
|
||||||
|
(concat "<iframe width=\"1280\""
|
||||||
|
" height=\"720\""
|
||||||
|
" src=\"https://www.youtube.com/embed/%s\""
|
||||||
|
" frameborder=\"0\""
|
||||||
|
" allowfullscreen>%s</iframe>"))
|
||||||
|
|
||||||
|
(org-add-link-type
|
||||||
|
"yt"
|
||||||
|
(lambda (handle)
|
||||||
|
(browse-url
|
||||||
|
(concat "https://www.youtube.com/embed/"
|
||||||
|
handle)))
|
||||||
|
(lambda (path desc backend)
|
||||||
|
(cl-case backend
|
||||||
|
(html (format yt-iframe-format
|
||||||
|
path (or desc "")))
|
||||||
|
(md (format "{{< youtube %s >}}"
|
||||||
|
path))
|
||||||
|
(latex (format "\href{%s}{%s}"
|
||||||
|
path (or desc "video"))))))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Org Gcal
|
** Org Gcal
|
||||||
- https://cestlaz.github.io/posts/using-emacs-26-gcal/#.WIqBud9vGAk
|
- https://cestlaz.github.io/posts/using-emacs-26-gcal/#.WIqBud9vGAk
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user