-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublish.el
68 lines (64 loc) · 2.38 KB
/
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
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
;; -*- lexical-binding: t; no-byte-compile: t -*-
;; From https://opensource.com/article/20/3/blog-emacs,
;; Modified to use straight package manager
(setq invocation-name (file-name-nondirectory (car command-line-args)))
(setq comp-deferred-compilation nil)
;; Install straight
(defvar bootstrap-version)
(setq straight-repository-branch "develop")
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(push "lib" straight-default-files-directive)
(straight-use-package 'use-package)
(use-package ox-publish)
(setq org-publish-project-alist
'(("posts"
:base-directory "posts/"
:base-extension "org"
:publishing-directory "docs/"
:recursive t
:publishing-function org-html-publish-to-html
:auto-sitemap t
:sitemap-title "Blog Index"
:sitemap-filename "postlist.org"
:sitemap-style list
:author "Jacob Salzberg"
:email "[email protected]"
:with-creator t)
("projects"
:base-directory "projects/"
:base-extension "org"
:publishing-directory "docs/"
:recursive t
:publishing-function org-html-publish-to-html
:author "Jacob Salzberg"
:email "[email protected]"
:with-creator t)
("css"
:base-directory "css/"
:base-extension "css"
:publishing-directory "docs/css"
:publishing-function org-publish-attachment
:recursive t)
("photos"
:base-directory "photos/"
:base-extension "png\\|jpg\\|gif\\|svg\\|pdf"
:publishing-directory "docs/photos"
:publishing-function org-publish-attachment
:recursive t)
("tetris"
:base-directory "tetris/"
:base-extension "json\\|js\\|gif\\|png\\|html\\|css\\|svg\\|gitignore"
:publishing-directory "docs/tetris"
:publishing-function org-publish-attachment
:recursive t)
("all" :components ("posts" "projects" "css" "photos" "tetris"))))