我使用 org-mode 导出博客的内容,然后使用 jekyll 生成结果博客页面。
我发现当我将body-only设置为 true 时,org-project 导出不包含 org 文件的TOC(目录)。
如何配置让 emacs 生成 TOC?
这是我的.emacs
配置:
;; org-mode project define
(setq org-publish-project-alist
'(
("org-blog-content"
;; Path to your org files.
:base-directory "~/ChinaXing.org/org/"
:base-extension "org"
;; Path to your jekyll project.
:publishing-directory "~/ChinaXing.org/jekyll/"
:recursive t
:publishing-function org-publish-org-to-html
:headline-levels 4
:html-extension "html"
:table-of-contents t
:body-only t ;; Only export section between <body></body>
)
("org-blog-static"
:base-directory "~/ChinaXing.org/org/"
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|php"
:publishing-directory "~/ChinaXing.org/jekyll/"
:recursive t
:publishing-function org-publish-attachment)
("blog" :components ("org-blog-content" "org-blog-static"))
))