[Grok-dev] Re: zc.buildout tutorial

Darryl Cousins darryl at darrylcousins.net.nz
Sat Aug 4 19:54:44 EDT 2007


Hi,

On Sat, 2007-08-04 at 15:48 +0200, Uli Fouquet wrote:
> Hi, 
> 
> On Sat, 04.08.2007, 16:22 +1200, Darryl Cousins wrote
> 
> > I've altered grok2html to use urllib to grab tutorial.txt from
> > svn.zope.org/zc.buildout/trunk/doc/tutorial.txt.
> 
> Cool, Darryl!
> 
> > This still doesn't support highlighting because Jim uses::
> > 
> >     code-block: Python
> > 
> > and pygments expects::
> > 
> >     code-block: python  # (lower-case P)
> 
> Following the dicussions of the docutils-SIG, the latter will be the
> standard way to do it. So I think this is fine.
> 
> > Furthermore to have highlighting additional css directives are necessary to
> > colourise the code block. I haven't implemented this either.
> 
> I just added the pygments-default.css to the ressources directory and
> added an @import in the grok.css. Now code-highlighting is available for
> all mini-tutorials. 
> 
> In short for the other tutorial authors: You can now use
> 
> 	.. code-block: python
> 
> in front of a code fragment to enable source-highlighting. The macros
> tutorial is already using this.

Cheers Uli for this extra step. I've updated grok.zope.org to include
the css and highlighting (searching tutorial too). I've also used

      .. code-block: html

in the appropiate places. Very colourful!

Regards,
Darryl

> 
> > I'm happy with the hack as it is because we may hope and expect code
> > highlighting to be included in stock docutils in the future.
> 
> I'm happy too. Thank you, Darryl!
> 



More information about the Grok-dev mailing list