zk / Publishing

Table of Contents

Parts of the zettelkasten can be published as a website.

Because I'd like to work on a page for a while before publishing it (e.g. via the RSS feed), each file needs an optional "PUBLISHED" date in addition to its creation date.

Configuration

(defvar org-zk-published-property "PUBLISHED")

Setting the Publication Date

(defun org-zk-set-published ()
  "Add a publication date property to the current buffer."
  (interactive)
  (if (org-zk-keywords-get org-zk-published-property)
      (message "Buffer is already published")
    (org-zk-keywords-add
     org-zk-published-property
     (org-format-time-string "[%Y-%m-%d %a %H:%M]" (current-time)))))

(defun org-zk-set-published-to-creation-date ()
  "Set the publication date to the creation date of the file."
  (interactive)
  (if (org-zk-keywords-get org-zk-published-property)
      (message "Buffer is already published")
    (if-let ((date (org-zk-keywords-get "DATE")))
      (org-zk-keywords-add org-zk-published-property date)
      (message "Buffer has no creation date"))))

Created: 2020-07-27
Last export: 2020-08-14 Fri 17:06

If you have an idea how this page could be improved or a comment send me a mail.