blog/introducing-ox-coleslaw.post

54 lines
2.5 KiB
Text
Raw Permalink Normal View History

2015-09-01 00:16:00 +02:00
;;;;;
title: Introducing ox-coleslaw
date: 2015-08-05
tags: meta, ox-coleslaw, emacs, cask, tekuti, projects, org-mode
format: html
;;;;;
<p>
I have a big problem: I can't write a blog in anything other than <a href="http://orgmode.org/">Org
mode</a>. I have another problem: I haven't found a good way to write a
blog only in Org mode. This always keeps me going back and forth
between blogging systems. I've used <a href="http://wingolog.org/projects/tekuti/">tekuti</a>, <a href="https://wordpress.org/">WordPress</a>, and I've tried
a few others. Currently I'm using <a href="https://github.com/kingcons/coleslaw">Coleslaw</a>. I haven't written anything
lately though because it supports Markdown and HTML and I was getting
antsy for some Org mode again. So I've been on the lookout for
something new.
</p>
<p>
Well&#x2026; <b>I've had enough</b>. I'm not going away this time. I'm going to
fix my problems and commit to this system. I picked Coleslaw because
it's written en Common Lisp and has some interesting features. I'm
going to write an exporter for org to whatever Coleslaw needs!
</p>
<p>
I've known that it's pretty easy to write an exporter for Org mode for
some time, but I've never actually tried to write one. I modified some
bits and bobs on <a href="https://github.com/ryuslash/org-blog">org-blog</a>, but that didn't really work out. Today
though, while reading an old(er) post on <a href="http://endlessparentheses.com/how-i-blog-one-year-of-posts-in-a-single-org-file.html?source=rss">Endless Parentheses</a>, I ran
into <a href="https://github.com/yoshinari-nomura/org-octopress/blob/master/ox-jekyll.el">ox-jekyll</a>. Jekyll has a pretty similar page/post definition
syntax to Coleslaw, so it seemed easy to read what they're doing and
copy the relevant parts. It's a very small Emacs Lisp file, which made
it very easy. So congrats to them and the people writing Org mode for
making some very clear code.
</p>
<p>
So I wrote (or copied) <a href="https://github.com/ryuslash/ox-coleslaw">ox-coleslaw</a> based on ox-jekyll. It's slightly
smaller than ox-jekyll because, frankly, it offers less. I just need a
simple way to export a <code>.org</code> file to a <code>.post</code> file, nothing fancy.
</p>
<p>
To write posts I will use Org mode. Once ox-coleslaw is loaded I use
the org export function to export it to an HTML file with the proper
header. You can also do this non-interactively from, for example, a
Makefile, but that is a story for another time.
</p>
<p>
This document is the first attempt at publishing a blog post using
ox-coleslaw.
</p>