Search code examples
linuxsvnapachewebsvn

Code Highlighting for Subversion/Apache Server


I have beeen looking around for a way to add code highlighting to my Subversion and Apache installation that hosts my local subversion projects. It runs on Fedora Core 10 installed in a VM. I would like to use syntaxhighlighter but I have not idea how i can get Apache to automatically insert the required javascript into my source code files (without tainting the source).

It is possible to modify my existing installation of Apache 2.2/SVN 1.5.5 to use syntaxhighlighter? (this is what it looks like)

There is a project called WebSVN hosted by Collabnet that seems to have something similar built in, however after the trouble I've gone to get the web subversion working (And Fedora configured nicely), I don't want to use OpenCollabnet's version of WebSVN. Plus their version does not support the latest subversion and Apache.

How can I add some form of code highlighting to my Apache that serves the subversion source?


Solution

  • Trac is installed, I checked out Enscript, SilverCity and Pygments. There were no packages for FC10 for the first two, but there was a Pygments package.....it looks rather nice. Demos here

    The C++ highlighting is what i'm interested in, it looks decent: C++ Highlighting

    Although Pygments is obviously not as nice as syntaxhighlighter, which I would still prefer to use if someone knows an easy way to setup.