emacs ?= emacs
-OUT_DIR=/Users/peli3/Private/blog/_site
+OUTDIR := ""
all:
- $(emacs) -Q --batch \
- -l ./blog.el \
- index.org \
- --eval '(org-publish-current-project t)'
+ $(emacs) -Q --script blog.el $(OUTDIR)
+
clean:
rm -rf _site/*
;; constants
;; (defconst root-dir "~/Private/blog/")
(defconst root-dir (file-name-directory (or load-file-name buffer-file-name)))
-(defconst publish-dir (concat root-dir "_site/"))
+(defvar publish-dir (concat root-dir "_site/"))
(defconst css-file "../css/worg.css")
;; (defconst css-file (concat root-dir "css/worg.css"))
+(let ((aa (pop command-line-args-left)))
+ (if (> (length aa) 0)
+ (setq publish-dir aa)))
+;; (setq publish-dir (or (pop command-line-args-left) publish-dir))
+(message publish-dir)
(require 'org)
-;; (require 'org-html)
(require 'ox-publish)
(require 'htmlize)
-
+(message "Org-mode version %s" (org-version))
+(message "publish directory is %s" publish-dir)
;; To prevent inline-css when exporting html. will use external css
(setq org-html-htmlize-output-type 'css)
("org" :components ("org-notes" "org-static"))))
-(provide 'blog)
+(org-publish-project "org" t)
+
+;; (provide 'blog)
+(kill-emacs 0)
;;; blog.el ends here
+ posts
+ [[file:posts/Blog-with-org-mode.org][Blog with Org Mode]]
+ + [[file:posts/emacs-note.org][Emacs Lisp Study Note]]
+ [[file:posts/git-note.org][Git Note]]
+ [[file:posts/My-work-flow-with-tmux-vim-zsh-iterm.org][My Work Flow with Tmux + Vim + Zsh + iTerm2]]
+ [[file:posts/linux-note.org][Note of Linux (Debian)]]