From bd83688c8d78f61e534a57874b41a2d4cd3a42e2 Mon Sep 17 00:00:00 2001 From: Anastasios Manganaris Date: Sun, 29 May 2022 14:15:27 -0400 Subject: Add option for extra haunt metadata per file Hello, Thank you for making ox-haunt.el. I use some extra metadata to control how my haunt website is organized. I modified ox-haunt to let me add extra metadata to each file. Like this: #+haunt_metadata: ((recent . t) (status . "Completed") (purpose . "Make development with GNU Guix easier.")) Do you consider this a worthwhile feature? Does this change look alright? Best, Tassos Manganaris --- ox-haunt.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ox-haunt.el b/ox-haunt.el index 2d9f9fd..5d42f98 100644 --- a/ox-haunt.el +++ b/ox-haunt.el @@ -46,6 +46,7 @@ (template . ox-haunt-template)) :options-alist '((:tags "TAGS" nil nil) + (:haunt-metadata "HAUNT_METADATA" nil nil) (:haunt-base-dir "HAUNT_BASE_DIR" nil ox-haunt-base-dir) (:haunt-images-dir "HAUNT_IMAGES_DIR" nil ox-haunt-images-dir))) @@ -148,6 +149,8 @@ INFO is the current state of the export process, as a plist." (insert (format "%s: %s\n" (substring (symbol-name keyword) 1) (ox-haunt--keyword-as-string info keyword))))) + (dolist (p (read (ox-haunt--keyword-as-string info :haunt-metadata))) + (insert (format "%s: %s\n" (car p) (cdr p)))) (buffer-string)) "---\n" ;; Output the article contents. -- cgit v1.3