projects
/
blog.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
blog - using defconstat instead hard code
[blog.git]
/
blog.el
diff --git
a/blog.el
b/blog.el
index
46b6bf7
..
eeda3e1
100644
(file)
--- a/
blog.el
+++ b/
blog.el
@@
-27,25
+27,40
@@
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(package-initialize)
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(package-initialize)
+
(setq debug-on-error t)
(setq debug-on-error t)
+;; package initialise
(unless (package-installed-p 'htmlize)
(package-refresh-contents)
(package-install 'htmlize))
(unless (package-installed-p 'htmlize)
(package-refresh-contents)
(package-install 'htmlize))
+;; constants
+;; (defconst root-dir (file-name-directory (or load-file-name buffer-file-name)))
+(defconst root-dir "~/Private/blog/")
+(defconst publish-dir "~/Private/publish_html/")
+
+
+
+
+
+
(require 'org)
(require 'org)
+;; (require 'org-html)
(require 'ox-publish)
(require 'htmlize)
(require 'ox-publish)
(require 'htmlize)
+
+
;; To prevent inline-css when exporting html. will use external css
(setq org-html-htmlize-output-type 'css)
(setq org-publish-project-alist
`(
("org-notes"
;; To prevent inline-css when exporting html. will use external css
(setq org-html-htmlize-output-type 'css)
(setq org-publish-project-alist
`(
("org-notes"
- :base-directory
"~/Private/blog/"
+ :base-directory
,root-dir
:base-extension "org"
:base-extension "org"
- :publishing-directory
"~/Private/publish_html"
+ :publishing-directory
,publish-dir
:recursive t
:publishing-function org-html-publish-to-html
:headline-levels 4
:recursive t
:publishing-function org-html-publish-to-html
:headline-levels 4
@@
-62,9
+77,9
@@
:html-head-include-default-style nil
:html-head-include-scripts nil)
("org-static"
:html-head-include-default-style nil
:html-head-include-scripts nil)
("org-static"
- :base-directory
"~/Private/blog/"
+ :base-directory
,root-dir
:base-extension "css\\|js\\|png\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
:base-extension "css\\|js\\|png\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
- :publishing-directory
"~/Private/publish_html"
+ :publishing-directory
,publish-dir
:recursive t
:publishing-function org-publish-attachment
:table-of-contents nil)
:recursive t
:publishing-function org-publish-attachment
:table-of-contents nil)