summaryrefslogtreecommitdiff
path: root/publish.el
blob: e417892137e43c7132596680159f5a6101217730 (plain) (blame)
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
35
36
37
38
39
40
41
42
43
(package-initialize)

(require 'ox-publish)

(defun me/html-preamble (plist)
  (with-temp-buffer
    (insert-file-contents "../html-templates/preamble.html") (buffer-string)))

(defun me/html-postamble (plist)
  (with-temp-buffer
    (insert-file-contents "../html-templates/postamble.html") (buffer-string)))

(setq org-publish-project-alist
      '(("pages"
         :base-directory "pages"
         :base-extension "org"
         :publishing-directory "site"
         :recursive t
         :publishing-function org-html-publish-to-html
	 :html-head "<link rel='stylesheet' href='../css/default.css' type='text/css'/>"
	 :html-prefer-user-labels t
	 :html-mathjax-options nil
	 :html-mathjax-template ""
	 :with-toc nil
	 :section-numbers nil
	 :html-self-link-headlines t
	 :html-preamble me/html-preamble
	 :html-postamble nil
	 )
	("pages-html"
	 :base-directory "pages"
	 :base-extension "html"
	 :publishing-directory "site"
	 :recursive t
	 :publishing-function org-publish-attachment)
	("css"
         :base-directory "css"
         :base-extension "css"
         :publishing-directory "site/css"
         :publishing-function org-publish-attachment
         :recursive t
	 )
        ("all" :components ("pages" "pages-html" "css"))))