forked from caiorss/Emacs-Elisp-Programming
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.el
63 lines (43 loc) · 1.32 KB
/
build.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
51
52
53
54
55
56
57
;; Minimal script to build the *.html files and export them
;; to the ./dist directory
;;
;; Usage: Run with
;; $ emacs --batch -q -l build.el --kill
;;
;;
(setq package-archives
'(
;;("melpa" . "https://melpa.milkbox.net/packages/")
;;("popkit" . "http://elpa.popkit.org/packages/")
("melpa" . "https://melpa.org/packages/")
("gnu" . "http://elpa.gnu.org/packages/")
))
(package-initialize)
(defun packages-require (&rest packs)
"Install and load a package. If the package is not available
installs it automaticaly.
"
(mapc (lambda (package)
(unless (package-installed-p package)
(package-install package)
;;#'package-require
))
packs
))
(packages-require 'htmlize)
(require 'org)
(require 'htmlize)
(require 'ox-publish)
;; Htmlize output set by css
(setq org-html-htmlize-output-type 'css)
;; (setq org-html-htmlize-output-type 'inline-css) ;; default
;; Org-html htmlize font prefix
(setq org-html-htmlize-font-prefix "org-")
(org-publish '("html"
:base-directory "."
:base-extension "org"
:publishing-directory "./dist"
:publishing-function org-html-publish-to-html
)
t
)