add makefile to generate blog
authorPeng Li <seudut@gmail.com>
Sat, 4 Mar 2017 08:11:11 +0000 (16:11 +0800)
committerPeng Li <seudut@gmail.com>
Sat, 4 Mar 2017 08:11:11 +0000 (16:11 +0800)
Makefile [new file with mode: 0644]
blog.el

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..8d478c8
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,13 @@
+## Makefile to export org in blog file to html
+
+emacs ?= emacs
+
+OUT_DIR=/Users/peli3/Private/blog/_site
+
+all:
+       $(emacs) -Q --batch \
+               -l ./blog.el \
+               index.org \
+               --eval '(org-publish-current-project t)'
+clean:
+       rm -rf _site/*
diff --git a/blog.el b/blog.el
index a0bb36b..7d21236 100644 (file)
--- a/blog.el
+++ b/blog.el
@@ -78,7 +78,7 @@
          :html-head-include-scripts nil)
         ("org-static"
          :base-directory ,root-dir
-         :base-extension "css\\|js\\|png\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
+         :base-extension "css\\|js\\|png\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|el"
          :publishing-directory ,publish-dir
          :recursive t
          :publishing-function org-publish-attachment