octopress / code-highlighter

Octopress's core pygments system for rendering code blocks.
MIT License
10 stars 5 forks source link

Switch to rouge #2

Closed imathis closed 10 years ago

imathis commented 10 years ago

This is pretty much a drop in replacement for Pygments. It doesn't have the full set of languages and the API is different, but it should work fine, and remove our dependency on python wrappers.

Obviously the name of this plugin will need to change. For now I'm calling it octopress-code-style which is pretty dull, but works. Suggestions welcome. :)

imathis commented 10 years ago

@parkr any ideas for what to call this? For now I'm using octopress-code-style but I'm also considering octopress-code. Any ideas?

parkr commented 10 years ago

I'd say octopress-rouge or something so people have the option of using either Pygments or Rouge. Unless you don't want to support both. Then I'd call it something like octopress-syntax-highlighting or something directly to do with its function within the Octopress ecosystem.

imathis commented 10 years ago

I'm thinking about calling it something generic and perhaps supporting both options. Right now Jekyll requires pygments.rb, and it seems that it will in 2.0 as well. I think I'll probably switch this back to defaulting to Pygments since it comes with Jekyll, but if people have Rouge installed. I can use that instead.

parkr commented 10 years ago

If all goes well with Rouge, I'll propose to the Jekyll peeps that we switch to Rouge as the default. Supporting both is good for now, but pure Ruby FTW.

imathis commented 10 years ago

Yeah I'd agree. What I'll do is attempt to load both and whichever is successful gets to be the renderer. That way whatever Jekyll defaults to will be likely what is used. I'll allow Rouge to override Pygments though so folks having trouble with Pygments can easily use Rouge.

imathis commented 10 years ago

So highlighter is like a tongue twister to type. All of those similar letters are easy to jumble. But it's unlikely people will ever install this gem directly since it's just a base gem for other plugins to highlight code. I think this is probably good for a merge and a name change.

parkr commented 10 years ago

:+1: As long as the usage instructions are clear in the README we should be good to go!