[dokuwiki] Re: syntax hilighting

Chris Smith wrote:

> The file lib/styles/style.css contains the GeSHi colouring.  You can
> edit the colours there to any dokuwiki code highlighting.  If you wish
> to specify highlighting for a specific code language you would add a
> style rule of the following type (I have assumed a language of php,
> any of the languages can be used in the same way).
>
> .code.php .br0 { color: #3333ff; font-weight: bold;}
> .code.php .co1 { color: #cc9933; font-decoration: underline; }
>
> etc.
>
> those styles can go in lib/styles/style.css or in your template
> stylesheet. Making your own template (its enough to just make a
> straight copy and change the $conf[template] variable) and modifying
> its stylesheet makes most sense as then you don't risk losing your
> changes when upgrading dokuwiki.
>
> I don't know how GeSHi decides which class gets applied to which
> aspects of the particular code.  However, with Firefox, its Web
> Developer extension & the CSS/View Style Information tool its easy to
> hover over bits of the web page and see the id & class heirarchy for
> any page element.
>
> Chris

Ok, then I'm really confused as to how Geshi is supposed to work. 
Unless I am misunderstanding what you are saying above, you are
suggesting that we have to set up additional style sheets to do what
Geshi is supposed to (and does when you disable classes).

That said and reading up on the geshi docs...classes are better than the
inline styles (which appears to be exactly what you get when you disable
classes).  Basically from what I can gather you are locking in the
styles to be only what is defined in your stylesheets.  It seems to me
that this is actually crippling the functionality of what Geshi buys you
(this is even a recommended option on the geshi website which makes it
pretty much pointless to install geshi for syntax hilighting).  It might
actually be useful to have a config option that allows you to enable or
disable geshi classes.

OK...now let's say I want to go ahead and set up a style sheet with all
the different syntax highlighing that I just spent 2 days adding to
geshi (since the hilighting I needed wasn't already part of geshi).  I
am already using a template other than default.  However, I see no
style.css files in any of the templates I've looked in thusfar.  Do I
need to copy the style.css to somewhere under the template folder?  If
so, where (template making docs are a bit lacking here)? Do I just edit
the design.css file within the template (similar to what was necessary
for the note plugin)?  Can I create a stylesheet (php.css for example)
and include it in another?  (Just curious as I can't find it
documented...can classes have spaces within it?  the code classes are
"code lang"...)

=G=

=G=
-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: