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 CSS := $(wildcard css/*.css)
17 .PHONY: update publish clean
21 --eval $(INIT_PACKAGES) \
22 --eval '(setq debug-on-error t)' \
23 -l my-publish.el index.org \
24 --eval '(blog-setup-project-alist "$(BLOGDIR)" "$(OUTDIR)")' \
25 --eval '(org-publish-current-project)'
28 ifeq ($(UPDATE), true)
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