org-static/src/elisp/org-static.el

21 lines
636 B
EmacsLisp

(require 'liborg_static)
(defun org-static-file-info (filename)
(vector (nth 0 (cdr (nth 0 (org-collect-keywords '("title" "")))))
(nth 0 (cdr (nth 0 (org-collect-keywords '("author" "")))))
(nth 0 (cdr (nth 0 (org-collect-keywords '("date" "")))))
(nth 0 (cdr (nth 0 (org-collect-keywords '("slug" "")))))
(nth 0 (cdr (nth 0 (org-collect-keywords '("filetags" "")))))))
(defun org-static-file-contents (filename)
(org-export-string-as (f-read-text filename 'utf-8) 'html t))
(defun org-static-publish-current-project ()
(org-static-publish (file-name-directory (buffer-file-name))))
(provide 'org-static)