-
Notifications
You must be signed in to change notification settings - Fork 2
/
publish.el
27 lines (24 loc) · 871 Bytes
/
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
(require 'package)
(package-initialize)
(unless package-archive-contents
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-refresh-contents))
(dolist (pkg '(htmlize))
(unless (package-installed-p pkg)
(package-install pkg)))
(require 'org)
(require 'ox-publish)
(defun publish-examples ()
"Publish the org-mode examples."
(setq org-html-postamble nil)
(setq org-publish-project-alist
'(("examples"
:base-directory "."
:base-extension "org"
:publishing-directory "./public"
:recursive t
:publishing-function org-html-publish-to-html
:headline-levels 4 ; Just the default for this project.
:auto-preamble t)))
(org-publish-project "examples"))