publish.el 1.57 KB
Newer Older
JoJo's avatar
JoJo committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
(defun jozone-org-publish-to-html (plist filename pub-dir)
  (let ((org-html-htmlize-output-type 'css))
    (jojo-org-publish-to-html plist filename pub-dir)))

(let* ((dir (file-name-directory load-file-name))
       (root "/")
       (projects `(("jozone"
                    :base-directory ,dir
                    :base-extension "org"
                    :publishing-directory ,dir
                    :publishing-function jozone-org-publish-to-html

                    :author "JoJo"
                    :email "[email protected]"
                    :language "en"
                    :headline-levels 4
                    :with-footnotes t
                    :with-latex t
                    :with-tables t
                    :with-toc 2
                    :with-todo-keywords nil
                    :exclude-tags ("noexport")

                    :html-head ,(format "<link href=\"%s\" rel=\"stylesheet\" type=\"text/css\" />" (concat root "css/style.css"))
                    :html-home/up-format
                    ,(concat "<a href=\"%s\">Home</a>"
                             "<a href=\"https://github.com/JoJoZ/\">GitLab</a>"
                             "<a href=\"https://github.com/bryal/\">GitHub</a>"
                             "<a href=\"https://gitlab.com/JoJoZ/jo-zone/\">Source</a>")
                    :html-postamble "<p class=\"author\">Author: %a (%e)</p><p class=\"date\">Last updated: %T</p><p class=\"creator\">%c</p>"
                    :html-link-home ,root
                    ))))
  (setq org-publish-project-alist
        (append projects org-publish-project-alist)))