39 lines
2.4 KiB
Org Mode
39 lines
2.4 KiB
Org Mode
#+TITLE: Introducing ox-coleslaw
|
|
#+DATE: 2015-08-05
|
|
#+COLESLAW_TAGS: meta, ox-coleslaw, emacs, cask, tekuti, projects, org-mode
|
|
|
|
I have a big problem: I can't write a blog in anything other than [[http://orgmode.org/][Org
|
|
mode]]. 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 [[http://wingolog.org/projects/tekuti/][tekuti]], [[https://wordpress.org/][WordPress]], and I've tried
|
|
a few others. Currently I'm using [[https://github.com/kingcons/coleslaw][Coleslaw]]. 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.
|
|
|
|
Well... *I've had enough*. 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!
|
|
|
|
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 [[https://github.com/ryuslash/org-blog][org-blog]], but that didn't really work out. Today
|
|
though, while reading an old(er) post on [[http://endlessparentheses.com/how-i-blog-one-year-of-posts-in-a-single-org-file.html?source=rss][Endless Parentheses]], I ran
|
|
into [[https://github.com/yoshinari-nomura/org-octopress/blob/master/ox-jekyll.el][ox-jekyll]]. 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.
|
|
|
|
So I wrote (or copied) [[https://github.com/ryuslash/ox-coleslaw][ox-coleslaw]] 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 =.org= file to a =.post= file, nothing fancy.
|
|
|
|
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.
|
|
|
|
This document is the first attempt at publishing a blog post using
|
|
ox-coleslaw.
|