This e-mail got stuck in the approval queue and I only noticed it today. Sorry!
The colorize_syntax filter that comes with nanoc allows specifying the language in a comment at the beginning of the code block. Also see http://nanoc.stoneship.org/docs/api/3.2/Nanoc3/Filters/ColorizeSyntax.html. For example:
#!ruby
def foo
puts "hello"
end
Syntax coloring can be done using pygments. You can pass the :default_colorizer => :pygmentize option to the filter to set the colorizer to be used for all languages (you can also specify a colorizer per language).
nanoc 3.2 does not have Redcarpet 2 support, but the master branch has a filter that is compatible with Redcarpet 2. With the new filter, you can pass :renderer => Redcarpet::Render::HTML_TOC to get a table of contents.
Alternatively, if you want a table of contents, you can roll your own TOC helpers. For the nanoc site, I use the following: https://github.com/ddfreyne/nanoc-site/blob/master/lib/helpers/toc.rb.
So, Kramdown and Maruku not having support for syntax coloring does not eliminate them; you just use nanoc’s more powerful syntax coloring filter. :)
Cheers,
Denis
> --
> You received this message because you are subscribed to the nanoc discusssion group.
>
> To post to this group, send email to na...@googlegroups.com
> To unsubscribe from this group, send email to
> nanoc+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nanoc?hl=en