-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-site.el
50 lines (42 loc) · 1.63 KB
/
build-site.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
45
46
47
48
49
50
;; Load the publishing system.
(require 'ox-publish)
;; Let org use imagemagick to set the image to the desired width.
(setq org-image-actual-width nil)
;; Define the publishing project.
(setq org-publish-project-alist
(list
(list "mps-content"
:recursive t
:base-directory "./content"
:publishing-directory "./public"
:publishing-function 'org-html-publish-to-html
:with-author nil
:with-creator nil
:with-date t
:with-toc nil
:section-numbers nil
:time-stamp-file nil)
(list "mps-css"
:recursive nil
:base-directory "./style"
:base-extension "css"
:publishing-directory "./public"
:publishing-function 'org-publish-attachment)
(list "mps-assets"
:recursive nil
:base-directory "./assets"
:base-extension "pdf\\|svg\\|jpg\\|gif"
:publishing-directory "./public/assets"
:publishing-function 'org-publish-attachment)))
;; Remove the validation link.
(setq org-html-validation-link nil)
;; Remove default headers and style.
(setq org-html-head-include-scripts nil)
(setq org-html-head-include-default-style nil)
;; Include my own css style.
(setq org-html-head "<link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\">")
;; Open all links in external tabs, unless specified otherwise.
(setq org-html-head (concat org-html-head "<base target=\"_blank\">"))
;; Generate the html. The 't' is for discarding cached values.
(org-publish-all t)
(message "Build complete.")