Skip to content

Instantly share code, notes, and snippets.

@glallen01
Forked from abhiyerra/org_converter.rb
Created July 24, 2016 02:06
Show Gist options
  • Save glallen01/a450d336851134da5d6403fb2f52abdf to your computer and use it in GitHub Desktop.
Save glallen01/a450d336851134da5d6403fb2f52abdf to your computer and use it in GitHub Desktop.
module Jekyll
# Convert org-mode files.
require 'org-ruby'
class OrgConverter < Converter
safe true
def setup
# No-op
end
def matches(ext)
ext =~ /org$/i
end
def output_ext(ext)
".html"
end
def convert(content)
setup
Orgmode::Parser.new(content).to_html
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment