This plugin adds Org mode support to Jekyll and lets you write posts and pages in Org.
- Jekyll
- org-ruby
For experienced Jekyll users, you need to do 2 things to get jekyll-org to work
- Install the gem
- Include the gem in your
_config.yml - Include the gem in Gemfile
To use jekyll-org with Jekyll, you need to have Ruby RubyGems and Jekyll installed. See how to do that here.
Create a new Jekyll project my-site run:
jekyll new my-siteCreate a Gemfile in the root of the project, and add at least the following lines:
source 'https://rubygems.org'
gem 'jekyll' , '>= 3.0.0'
gem 'jekyll-org', '>= '1.0.1'Install the gems with bundler:
bundle installTo use the new converter add the following line to your _config.yml:
gems: [jekyll-org]Create a new file with .org extension 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:
require 'rubygems' require 'org-ruby' data = IO.read(filename) puts Orgmode::Parser.new(data).to_html
Then the output will have code highlighting:
require 'rubygems'
require 'org-ruby'
data = IO.read(filename)
puts Orgmode::Parser.new(data).to_htmleggcaker <eggcaker@gmail.com>
MIT