The default Apache mod_dav_svn listings are a little bland, but luckily you can use the SVNIndexXSLT Apache directive to spice things up a bit. I’ve been using a slightly modified version of the fantastic ReposStyle XSLT styles.
Assuming you’ve already set up subversion , download the latest ReposStyle from here and drop it in the document root, and configure Apache something like this :
<VirtualHost *:80> ServerName your_domain.com ServerAlias www.your_domain.com DocumentRoot /var/www/your_domain.com <Location /svn/> DAV svn SVNParentPath /var/lib/subversion/repositories/ SVNListParentPath on SVNIndexXSLT "/repos-web/view/repos.xsl" </Location> </VirtualHost>
… which looks something like this :

If you make a ReposStyle SVN repository of your own, and set up SVN so it serves from the root folder (eg. http://svn.recurser.com/ ), you can actually serve ReposStyle from within the subversion repository itself :
<VirtualHost *:80> ServerName svn.your_domain.com <Location /> DAV svn SVNParentPath /var/lib/subversion/repositories/ SVNListParentPath on SVNIndexXSLT "/repos-web/view/repos.xsl" </Location> </VirtualHost>
Configuring in this way will serve the style directly from subversion, although you may need to set the svn:mime-type properties for the XSL file.
No Responses to “Styling subversion listings with xslt”
Leave a Reply