mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-29 03:26:13 +01:00
Add org-id and included images notes to Org Roam
Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
parent
9770c3885a
commit
0c2b0fe8b5
|
@ -4,6 +4,25 @@
|
|||
#+title: Org Roam
|
||||
#+filetags: emacs-load
|
||||
|
||||
#+BEGIN_NOTE
|
||||
When exporting, running ~(org-id-update-id-locations (directory-files-recursively org-roam-directory ".org"))~
|
||||
#+END_NOTE
|
||||
|
||||
#+BEGIN_SRC emacs-lisp :tangle no :results none
|
||||
(defun replace-in-string (what with in)
|
||||
(replace-regexp-in-string (regexp-quote what) with in nil 'literal))
|
||||
|
||||
(defun org-html--format-image (source attributes info)
|
||||
(progn
|
||||
(setq source (replace-in-string "%20" " " source))
|
||||
(format "<img src=\"data:image/%s+xml;base64,%s\"%s />"
|
||||
(or (file-name-extension source) "")
|
||||
(base64-encode-string
|
||||
(with-temp-buffer
|
||||
(insert-file-contents-literally source)
|
||||
(buffer-string)))
|
||||
(file-name-nondirectory source))))
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_QUOTE
|
||||
Org-roam is a plain-text knowledge management system. It brings some of Roam's more powerful features into the Org-mode ecosystem.
|
||||
|
|
Loading…
Reference in a new issue