-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-site.el
More file actions
122 lines (105 loc) · 3.87 KB
/
build-site.el
File metadata and controls
122 lines (105 loc) · 3.87 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
;; Set the package installation directory so that packages aren't stored in the
;; ~/.emacs.d/elpa path.
(toggle-debug-on-error)
(require 'package)
(setq package-user-dir (expand-file-name "./.packages"))
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
("elpa" . "https://elpa.gnu.org/packages/")))
;; Initialize the package system
(package-initialize)
(unless package-archive-contents
(package-refresh-contents))
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(eval-when-compile
(require 'use-package))
(use-package futhark-mode
:ensure t
:mode "\\.fut\\(_[a-z_]+\\)?\\'")
(use-package sml-mode
:ensure t)
;; Install dependencies
(package-install 'htmlize)
;; Load the publishing system
(require 'ox-publish)
(setq org-html-postamble-format
'(("en" "<div class=\"postamble\" class=\"status\">
<p class=\"copyright\">Copyright 2015-2020 %a<p>
<p class=\"email\">Email: %e</p>
<p class=\"date\">Created: %d</p>
<p class=\"modified\">Last modified: %C</p>
</div>")))
;; ;; Define the publishing project
;; (setq org-publish-project-alist
;; (list
;; (list "org-site:main"
;; :recursive t
;; :base-directory "./content"
;; :publishing-function 'org-html-publish-to-html
;; :publishing-directory "./public"
;; :with-author nil ;; Don't include author name
;; :with-creator t ;; Include Emacs and Org versions in footer
;; :with-toc t ;; Include a table of contents
;; :section-numbers nil ;; Don't include section numbers
;; :time-stamp-file nil))) ;; Don't include time stamp in file
(setq org-publish-project-alist
(list
(list "munksgaard.me-org"
:author "Philip Munksgaard"
:email "philip@munksgaard.me"
:base-directory "./"
:base-extension "org"
:publishing-directory "./build"
:recursive t
:publishing-function 'org-html-publish-to-html
:headline-levels 4 ; Just the default for this project.
:language "en"
:section-numbers nil
:time-stamp-file t
:with-author t
:with-creator nil
:with-email t
:with-emphasize t
:with-footnotes t
:with-tables t
:with-timestamps t
:with-toc nil
:html-postamble t
:html-doctype "xhtml-strict"
:html-divs '((preamble "header" "preamble")
(content "article" "content")
(postamble "footer" "postamble"))
:html-container "section"
:html-head "<style type=\"text/css\">
/*<![CDATA[*/
pre.src { overflow: auto; }
/*]]>*/
</style>"
:html-self-link-headlines t
:html-allow-name-attribute-in-anchors t
;; :html-html5-fancy t
:html-link-home "/index.html"
:html-link-up ""
:html-home/up-format "<div id=\"org-div-home-and-up\">
%s
<a accesskey=\"H\" href=\"%s\"> HOME </a>
</div>"
)
'("munksgaard.me-static"
:base-directory "./"
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|mp3\\|ogg\\|patch\\|txt"
:recursive t
:publishing-directory "./build"
:publishing-function org-publish-attachment
)
'("papers"
:base-directory "./papers/"
:base-extension "pdf"
:publishing-directory "./build/papers"
:publishing-function org-publish-attachment)
'("munksgaard.me" :components ("munksgaard.me-org" "munksgaard.me-static" "papers")))
)
;; Generate the site output
(org-publish-all t)
(message "Build complete!")