-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-site.el
More file actions
46 lines (38 loc) · 1.37 KB
/
build-site.el
File metadata and controls
46 lines (38 loc) · 1.37 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
;; Load the publishing system
(require 'ox-publish)
;; Set the package installation directory so that packages aren't stored in the
;; ~/.emacs.d/elpa path.
(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))
;; Install dependencies
(package-install 'htmlize)
;; Define the publishing project
(setq org-publish-project-alist
(list
(list "Andrew Chitester's website"
:author "Andrew Chitester"
:email "andchi@fastmail.com"
:recursive t
:base-directory "./content"
:publishing-directory "./public"
:with-author nil
:with-toc nil
:section-numbers nil
:time-stamp-file nil
:auto-sitemap t
:sitemap-title "Andrew Chitester's sitemap"
:publishing-function 'org-html-publish-to-html)))
;; Customize the HTML output
(setq org-html-validation-link nil
org-html-htmlize-output-type nil
org-html-head-include-scripts nil
org-html-head-include-default-style t)
;; Generate the site output
(org-publish-all t)
(message "Build complete")