X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=Makefile;h=0797b2db0d4b1eeee7b8470fa171aaf54e42186e;hb=29f15ec5bcc51fa01fc46e758cda6401007445ff;hp=8d478c8edc02ff4a800b17d58d2b8285ea9e2309;hpb=97a6efb026d66df8024ebbbf9450f2f721d2d7e8;p=blog.git diff --git a/Makefile b/Makefile index 8d478c8..0797b2d 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,29 @@ ## Makefile to export org in blog file to html emacs ?= emacs - -OUT_DIR=/Users/peli3/Private/blog/_site +OUTDIR := +FORCE := "no" +BLOGDIR := $(PWD) all: - $(emacs) -Q --batch \ - -l ./blog.el \ - index.org \ + $(emacs) -Q --script blog.el $(OUTDIR) $(FORCE) + +# used for automation on server +update: + git pull && $(emacs) -Q --script blog.el "~/www/html" "true" + +publish: + $(emacs) -Q --batch -l my-publish.el index.org \ + --eval '(setq debug-on-error t)' \ + --eval '(blog-setup-project-alist "$(BLOGDIR)" "$(OUTDIR)")' \ + --eval '(org-publish-current-project)' + +# test will force publishing all files in the porject +test: + $(emacs) -Q --batch -l my-publish.el index.org \ + --eval '(setq debug-on-error t)' \ + --eval '(blog-setup-project-alist "$(BLOGDIR)")' \ --eval '(org-publish-current-project t)' + clean: rm -rf _site/*