OUT OF DATE
WARNING This post is out of date. A newer infinitely better method is located at http://blog.paphus.com/blog/2012/08/01/introducing-octopress-blogging-for-org-mode/.
The first tutorial I followed is located at http://jaderholm.com/blog/blogging-with-org-mode-and-octopress. It managed to get me up and running but I noticed a few issues with it. The first issue was that it didn’t handle exported babel blocks like dot/graphviz. To fix that I needed to change two items in my
.emacs file. First I define a
save-then-publish function which I found online. Sadly I lost the original location.
(defun save-then-publish ()
'(("blog-org" . (:base-directory "~/blog/source/org_posts/"
:publishing-function (set-octopress org-publish-org-to-html unset-octopress)
("blog-extra" . (:base-directory "~/blog/source/org_posts/"
("blog" . (:components ("blog-org" "blog-extra")))
<pre> blocks and not getting highlighted. I managed to fix that with a simple regular expression to replace the code blocks before export and then restore the file back to its original state after the export. Please note that this is the first iteration of the function so it is not robust, it will only work for blocks that are simple begin_src blocks with a language specified. If you would like to improve on the function the comment section is open and I would appreciate it!
NOTE I had to locate this on pastebin because my function was matching its own code and messing with the highlighting.
Now instead of hitting
C-c C-e F I just hit
M-x save-then-publish ret and everything seems to work. Hope this helps someone out there looking to use org-mode to its full potential!