Skip to content

Instantly share code, notes, and snippets.

@matze
Created March 3, 2013 09:32
Show Gist options
  • Save matze/5075461 to your computer and use it in GitHub Desktop.
Save matze/5075461 to your computer and use it in GitHub Desktop.
Improved HTML output with Typogruby
require 'typogruby'
module Jekyll
class MarkdownConverter < Jekyll::Converter
def convert(content)
setup
return Typogruby.improve(Maruku.new(content).to_html)
end
end
end
@endquote
Copy link

endquote commented Jul 7, 2014

To get this to work in the current Jekyll I had to change it to this:

require 'typogruby'
require 'maruku'

module Jekyll
  class MarkdownConverter < Jekyll::Converter
    def convert(content)
      Typogruby.improve(Maruku.new(content).to_html)
    end

    def matches(ext)
      ext
    end

    def output_ext(ext)
      ext
    end
  end
end

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