Add banner div for my.css
[blog.git] / Makefile
1 ## Makefile to export org in blog file to html
2
3 emacs ?= emacs
4 OUTDIR := 
5 FORCE := "no"
6 BLOGDIR := $(PWD)
7
8 # To color the code block, install htmlize package
9 INIT_PACKAGES = "(progn \
10                                 (require 'package) \
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)))"
14
15 # used for automation on server
16 update:
17         git pull
18
19 publish: update
20         $(emacs) -Q --batch  \
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)'
26
27 # test will force publishing all files in the porject 
28 test:
29         $(emacs) -Q --batch \
30                 --eval $(INIT_PACKAGES) \
31                 --eval '(setq debug-on-error t)' \
32                 -l my-publish.el index.org \
33                 --eval '(blog-setup-project-alist "$(BLOGDIR)")' \
34                 --eval '(org-publish-current-project t)'
35
36 clean:
37         rm -rf _site/*