[dokuwiki] Re: Using GeSHi language definition colors instead of fixed colors for all languages


On 13 Mar 2009, at 12:49, D.Hendriks (Dennis) wrote:


So, yes it is discussed before. However, I created a patch and think it would
be useful to discuss it again...



Your mechanism for including styles isn't really an option. Styles shouldn't be inside the html body element (no matter that most browsers handle this) and if there were several code sections on a page you would be including the styles repeatedly.

Have you seen http://www.dokuwiki.org/tips:code_css which puts GeSHi highlighting into conf/userstyle.css

A simpler mechanism for some, might be to provide the styles in an installable plugin. Prepare a plugin and use the GeSHi stylesheet as that plugin's styles.css. DokuWiki's normal plugin mechanism will add the stylesheet into the wiki stylesheet. You may need to process the GeSHi styles to ensure they have a greater specificity than DokuWiki's own styles - refer the wiki page mentioned above.

Also, you can consider having your plugin replace DokuWiki's own code syntax much in the same way that other code plugins do, along with an action component to process the TPL_METAHEADER_OUTPUT event and add necessary GeSHi stylesheet(s) at that point.

Personally, I'm in favour of default DokuWiki being lean and able to be extended with plugins particularly appropriate to a specific wiki installation.

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

Other related posts: