Add virtualbox config
[blog.git] / Blog-with-org-mode.org
1 #+TITLE: Blog with Org Mode
2 #+AUTHOR: Peng Li
3 #+EMAIL: seudut@gmail.com
4 #+DATE: 2016-10-26
5 #+STARTUP: showall
6 #+STARTUP: inlineimages
7 #+OPTIONS: toc:nil date:t
8
9
10 今天总算把 Blog 的框架大致弄好了。主要参考了 =Org-mode= 的 tutorial, [[http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html#Special-comment-section][Publishing Org-mode files to HTML]] 和 [[https://ogbe.net/blog/blogging_with_org.html][Blogging using org-mode (and
11 nothing else)]]。 其中 =css= , 利用的是 =worg.css=, 并参考了[[http://dayigu.github.io/WhyUseOrgModeToWriteBlog.html][为什么用org-mode写 blog?]] 和  [[http://wiki.houye.xyz/blogwithorg-mode.html][用org-mode写博客]]。
12
13 * Org-publish 配置
14 其中有些配置可能是 =Org= 版本不同的原因,有些不同。比如 =htlm-head=, 代替 了 =style=
15 #+BEGIN_SRC emacs-lisp :tangle yes :results silent
16   (require 'ox-publish)
17
18   (setq org-publish-project-alist
19         `(
20           ("org-notes"
21            :base-directory "~/Private/blog/"
22            :base-extension "org"
23            :publishing-directory "~/Private/publish_html"
24            :recursive t
25            :publishing-function org-html-publish-to-html
26            :headline-levels 4
27            :section-numbers nil
28            :auto-preamble t
29            :auto-sitemap t          ;Generate sitmap.org automagicaly...
30            :sitemap-filename "sitemap.org" ;... call it sitemap.org (it's the default )...
31            :sitemap-title "Sitemap"
32
33            :table-of-contents nil
34            :html-postamble nil            ;dont export creator auto validation info in html postamble div
35            :html-link-home "/"
36            :html-head "<link rel='stylesheet' href='./css/worg.css' />"
37            ;; :html-head-extra ,my-blog-extra-head
38            :html-head-include-default-style nil
39            :html-head-include-scripts nil)
40           ("org-static"
41            :base-directory "~/Private/blog/"
42            :base-extension "css\\|js\\|png\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
43            :publishing-directory "~/Private/publish_html"
44            :recursive t
45            :publishing-function org-publish-attachment)
46           ("org" :components ("org-notes" "org-static"))))
47 #+END_SRC