Skip to content

setupgitlist

Florian Schneider edited this page Oct 7, 2014 · 1 revision

Setting up a gitList for repository visualisation

gitList

I followed this installation manual:

  • Install git, apache & php

    sudo apt-get update
    sudo apt-get install php5 apache2 git
    

apache & python

  • restart apache server

    $ sudo /etc/init.d/apache2 restart

Access control

You need to make sure that apache allows the regulation of access directives in files called .htaccess that are placed in the directory it applies to. This is enabled in the file 000-default on the server.

cd /etc/apache2/sites-enabled/
sudo vi 000-default

The argument AllowOverride needs to be edited to All

<Directory /var/www/>
	Options Indexes FollowSymLinks MultiViews
	AllowOverride None
	Order allow,deny
	allow from all
</Directory>

Now you can specify .htaccess in the apache home folder.

http://de.selfhtml.org/servercgi/server/htaccess.htm

Customize the look of gitList

Customize the content of the header bar.

Customize the style of text and other elements.

gitList is using TwitterBootstrap to make an automated static representation of the repositories. This is making use of less, an automated generator for cascading style sheets (css, tells the browser how to visualise certain elements of the website). The less files are stored in var/www/gitlist/web/less/. The created .css file is stored in var/www/gitlist/web/css. So, after the installation of less (see below), the procedure for customization of style is

  • find the .less-file that contains the element of question. For default text styles (headers, standard text, links) this should be type.less. For styles of inline code and code blocks this should be code.less.
  • Modify the files. You need admin rights to do this, since the whole folder www is owned by the apache user www-data. So from the terminal call sudo gedit filename.less.
  • update the .css file. In var/www/gitlist/web/ you can just run sudo make, which executes the Makefile containing the proper prompt.
install less

As prerequisites for the customization, less needs to be properly installed in version 1.3.0

The installer for less is node package modules, npm. So we have to install that first, as a package of node.js. It is a bit tricky in Ubuntu. I followed this HowTo:

First,ensure that python, g++ and make are installed.

sudo apt-get update
sudo apt-get install -y python-software-properties python g++ make

Next, select a repository for nodejs which comes equiped with npm, and install.

sudo add-apt-repository -y ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

However, we don't want to install the recent version of less! Since some major changes made it incompatible with the mixins.less file delivered with gitList, we need to select a previous version (1.3.0).

npm install -g [email protected]

That should install without error messages. Finally we can update our .css in gitList as described above.

Clone this wiki locally