Skip to content

Instantly share code, notes, and snippets.

@abhiyerra
Last active February 2, 2020 07:36
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save abhiyerra/7377603 to your computer and use it in GitHub Desktop.
Save abhiyerra/7377603 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
@priyadarshan
Copy link

@stardiviner If you were asking how it works, I believe it leverages org-ruby.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment