Skip to content

Latest commit

 

History

History
35 lines (33 loc) · 1.25 KB

doc-export.org

File metadata and controls

35 lines (33 loc) · 1.25 KB

Documentation Export

Let’s use the power of org-publish to our advantage.

(add-to-list 'org-publish-project-alist
  `("zetteldeft-doc"
    ; default pages
    :base-directory ,default-directory
    :base-extension "org"
    :publishing-directory ,(expand-file-name "docs" default-directory)
    :publishing-function org-html-publish-to-html
  ; exclude setup files (regexp)
    :exclude "doc-export\.org"
  ; org config
    :headline-levels 4
    :with-tags nil
    :with-toc nil
    :with-date nil
  ; html head
    :html-head-extra "<link rel='stylesheet' href='./static/style.css' type='text/css'/>"
  ; pre- and postamble
    :html-preamble ,(with-temp-buffer
                      (insert-file-contents 
                        (expand-file-name "docs/static/html-preamble.html"
                                          default-directory))
                      (buffer-string))
    :html-postamble ,(with-temp-buffer
                      (insert-file-contents 
                        (expand-file-name "docs/static/html-preamble.html"
                                          default-directory))
                      (buffer-string))))