From Fallow Fields, a new harvest

After a long hiatus, I've decided to return and restart my blogging activities. It's hard to be sure of my commitment, but my hope is that after leaving this pasture fallow for two years, it'll now yield a plentiful crop of posts.

Those who visited my blog before might be surprised to find that Epwna my blogs trusty steed has been put out to grass. Due to a change of blogging engine and theme, he can now be found munching on printer paper in the paddock. Perhaps he will one day return.

So whats changed to make me start blogging again? In short a change of blogging engine from Blorg, which had started failing to properly export my blog.

So for those who care, my revamped blog is still written in Emacs and the ever powerful Org-mode. This time using a combination of Jekyll, the excellent ruby static blog generator and secret sauce behind github pages, and the new org-jekyll, that acts as the glue between org-mode markup, and Jekyll.

So what's so cool about this combination? Well firstly it means I can blog like a hacker, keeping my posts backed up and managed inside git. And secondly it means I can write my posts in org-mode's familiar and powerful syntax. The benefits of using org-mode stretch way beyond those of traditional lightweight markup languages, as it'll let me merge my blogging activities with my existing note taking and planning workflows, whilst giving me access to powerful features such as org-mode's headline folding, its agenda, its Emacs based syntax highlighting, and org-babel's ability to execute and output the results of embedded code snippets directly into my blog!

Here's a small snippet of this blogs org-mode file:

* From Fallow Fields, a new harvest
   :PROPERTIES:
   :on:   [2010-02-06 Sat]
   :END:

After a long hiatus, I've decided to return and restart my blogging
activities.  It's hard to be sure of my commitment, but my hope is
that after leaving this pasture fallow for two years, it'll now yield
a plentiful crop of posts.

...
* Forget the Linux Desktop, it's the Linux Laptop that matters!
  :PROPERTIES:
  :on: <2007-11-27 Tue 22:25>
  :END:
       
The best innovations tend to be cheap and disruptive.  Hand in hand as
they're usually found, these characteristics go some way to explaining
why I like the EeePC (Asus's new laptop) so much.  The other reasons
are obvious, it's small, it's light, it has WiFi, Firefox and
 Open Office, and judging by the reactions of those who saw Paul and I
with them at Bar Camp Leeds, it's cool enough for everyone to want
one!

As you can see, org-mode can even export its own markup with htmlized syntax highlighting!

This new combination, is a huge improvement, and has many features that I hope to blog about in a future post. The first is that as it's built on top of Org-mode's excellent publishing and export features, which mean that I get easily publish code with full syntax highlighting.

For example below is the Emacs-lisp I'm using to publish this blog, isn't it pretty?

(require 'org-publish)
(require 'org-jekyll)

(setq sourcesmouth-org "~/git/sourcesmouth")
(setq sourcesmouth-org-publish (concat sourcesmouth-org "/publish/"))

(add-to-list 'org-publish-project-alist
             `("sourcesmouth-org"
               :base-directory ,sourcesmouth-org
               :recursive t
               :base-extension "org"
               :publishing-directory ,sourcesmouth-org-publish
               :publishing-function org-publish-org-to-html
               :section-numbers nil
               :headline-levels 4
               :table-of-contents nil
               :auto-index nil
               :inline-images t
               :todo-keywords t
               :auto-preamble nil
               :body-only t
               :auto-postamble nil))

(add-to-list 'org-publish-project-alist
             `("sourcesmouth-img"
               :base-directory ,sourcesmouth-org
               :recursive t
               :exclude "^publish"
               :base-extension "jpg\\|gif\\|png"
               :publishing-directory ,sourcesmouth-org-publish
               :publishing-function org-publish-attachment))

(add-to-list 'org-publish-project-alist
             '("sourcesmouth" :components ("sourcesmouth-org"
                                           "sourcesmouth-img")))

Cooler still is that with org-babel these embedded code snippets, can be made executable, capturing their output, and outputting their results directly into the blog. E.g. the following Emacs lisp reduce statement:

(reduce '+ '(1 2 3 4 5 6 7 8 9 10))

Yields the following result, directly into this document.

55

No other blogging engine I've seen can do anything like this!

So now I have a blog running again, what am I going to blog about? Well, I guess you'll have to stay tuned to find out.