1 ## Makefile to export org in blog file to html
8 # To color the code block, install htmlize package
9 INIT_PACKAGES = "(progn \
11 (add-to-list 'package-archives '(\"melpa\" . \"http://melpa.org/packages/\")) \
12 (package-initialize) \
13 (unless (package-installed-p 'htmlize) (package-refresh-contents) (package-install 'htmlize)))"
15 # used for automation on server
16 CSS := $(wildcard css/*.css)
17 OBJS := $(addprefix $(OUTDIR)/,$(CSS))
19 .PHONY: update publish clean
23 --eval $(INIT_PACKAGES) \
24 --eval '(setq debug-on-error t)' \
25 -l my-publish.el index.org \
26 --eval '(blog-setup-project-alist "$(BLOGDIR)" "$(OUTDIR)")' \
27 --eval '(org-publish-current-project)'
32 # if the source files (css) file changed, remote the org-timestamps to
33 # re-generate all the html files
34 temp: $(CSS) my-publish.el
35 rm -rf ~/.org-timestamps
39 ## test will force publishing all files in the porject
41 # $(emacs) -Q --batch \
42 # --eval $(INIT_PACKAGES) \
43 # --eval '(setq debug-on-error t)' \
44 # -l my-publish.el index.org \
45 # --eval '(blog-setup-project-alist "$(BLOGDIR)")' \
46 # --eval '(org-publish-current-project t)'