Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
move to asciidoctor
Browse files Browse the repository at this point in the history
  • Loading branch information
qmx committed Mar 4, 2013
1 parent 8d681b2 commit d36bb94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions Gemfile
Expand Up @@ -3,3 +3,4 @@ source :rubygems
gem 'RedCloth'
gem 'jekyll'
gem 'net-sftp'
gem 'asciidoctor'
9 changes: 2 additions & 7 deletions _plugins/asciidoc.rb
@@ -1,4 +1,4 @@
require 'open3'
require 'asciidoctor'
module Jekyll
class AsciiDoc < Converter
safe true
Expand All @@ -12,12 +12,7 @@ def output_ext(ext)
end

def convert(content)
cmd = "asciidoc -s -b html5 -a pygments -a imagesdir='../' -o - -"
Open3.popen3(cmd) do |stdin, stdout, _|
stdin.puts content
stdin.close
out = stdout.read
end
Asciidoctor::Document.new(content).render
end
end
end

0 comments on commit d36bb94

Please sign in to comment.