How to enable highlight in webgit

Edit /etc/gitweb.conf
To enable syntax highlighting; append the line
$feature{'highlight'}{'default'} = [1];

For some reasons a second file extension mapping exists in webgit.cgi. For most of the supported file types, webgit.cgi needs to be adjusted according to highlight's filetypes.conf:

Edit /usr/lib/cgi-bin/gitweb.cgi

   our %highlight_ext = (
     # add new entries or extend existing ones here
     map { $_ => 'php' } qw(php3 php4 php5 phps),
   );

See THINK.DONE how to configure webgit and highlight without root privileges.

en/webgit.txt · Last modified: 2012/06/18 21:33 (external edit)
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0