a Jekyll plugin for org-mode
This project is maintained by eggcaker
This plugin adds Org mode support to Jekyll and lets you write posts and pages in Org.
Install org-ruby
$ sudo gem install org-ruby
Clone the jekyll-org plugin
$ git clone http://github.com/eggcaker/jekyll-org.git /path/to/jekyllpath/_plugins/jekyll-org
If you want use jekyll-org as a submodule, you can:
$ cd /path/to/your/jekyll/site/
$ git submodule add http://github.com/eggcaker/jekyll-org.git _plugins/jekyll-org
Create a new file with .org
extesion in _posts
, and write the post
with Org. That is all! Generate your Jekyll site as you usually do.
Instead of YAML the front matter is configured in the usual Org way, with no lines:
#+TITLE: Jekyll and Org together
#+LAYOUT: posts
#+TAGS: jekyll org-mode
This is a blog post about Jekyll and Org mode.
By default the all content is exported to raw HTML with org-ruby, but
you can add #+liquid: whatevervalue=
in the header. Then you can use
Liquid
tags.
For example, if your Org file contains
#+liquid: enabled
#+foo: hello world
{{ page.foo }}
or
{{ site.time | date_to_xmlschema }}
then you will get output like
<p>hello world</p>
<p>or</p>
<p>2014-07-02T08:20:28+08:00</p>
Add a source code block as you would in Org, for example Ruby:
#+BEGIN_SRC
require 'rubygems'
require 'org-ruby'
data = IO.read(filename)
puts Orgmode::Parser.new(data).to_html
#+END_SRC
Then the output will have code highlighting:
require 'rubygems'
require 'org-ruby'
data = IO.read(filename)
puts Orgmode::Parser.new(data).to_html
eggcaker <eggcaker@gmail.com>
MIT