-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublish.el
44 lines (39 loc) · 1.23 KB
/
publish.el
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
44
;; (require 'org)
(require 'ox-publish)
(setq org-export-with-toc nil)
(setq org-publish-project-alist
'(("posts"
:base-directory "posts/"
:base-extension "org"
:publishing-directory "/var/www/blog/"
:recursive t
:publishing-function org-html-publish-to-html
:auto-sitemap nil
:exclude "header.org"
:sitemap-title "Index"
:sitemap-filename "index.org"
:sitemap-style list
:author "Marcos Magueta"
:email "[email protected]"
:with-creator t)
("images"
:base-directory "posts/images"
:base-extension "png\\|jpg"
:publishing-directory "/var/www/blog/images"
:publishing-function org-publish-attachment)
("css"
:base-directory "css/"
:base-extension "css"
:publishing-directory "/var/www/blog/css"
:publishing-function org-publish-attachment
:recursive t)
("all" :components ("posts" "css"))))
(defun rss-publish ()
(progn
(org-babel-tangle-file "scripts/rss.org")
(eval-expression (load-file "scripts/rss.el"))
(shell-command "mkdir -p generated/static/ && mv rss.xml generated/static/")))
(progn
(org-publish-all)
(rss-publish))
(provide 'publish)