Added description to media + agnostic embed

This commit is contained in:
Simon Cambier 2024-06-23 11:25:13 +02:00
parent 31a71b188e
commit 9b2eac201b

View File

@ -39,7 +39,9 @@
(each m media
(def url (m "url"))
(def folder (string save-path "attachments/"))
(array/push files (string "attachments/" (media/get-image url folder))))
(array/push files {:path (string "./attachments/" (media/get-image url folder))
:description (m "description")}))
(pp files)
files)
@ -59,7 +61,10 @@
" \n"))
(def media (string/join
(map (fn [arg] (string "![[" arg "]]")) files) " "))
(map (fn [arg] (string
"![](" (arg :path) ")\n "
(arg :description)))
files) " "))
(file/write fout
(string