reads Git repositories and generates static pages for them with a
predefined CSS stylesheet (I said stylesheet twice!), a
website logo and a favicon.
$ git clone git://git.codemadness.org/stagit $ cd stagit # doas make install clean
I like to have everything
/var/www/htdocs/git.mydomain.com along with the
actual repositories, but you can choose any other directory.
Store the stylesheet, logo and favicon inside. You'll find
the stylesheet inside the
you cloned earlier; it's called
the logo and favicon, just make your own, but make sure they
are in PNG format and have the same names as below.
# cp logo.png favicon.png style.css /var/www/htdocs/git.mydomain.com
You can edit the stylesheet to your likings, but if you're afraid that you'll mess things up, play around with the colors only.
Here I created a
/var/www/htdocs/git.mydomain.com/repo.git. I will
now make a directory to store the files that
will produce. I like to give it the same name as the repository
but without the
# mkdir /var/www/htdocs/git.mydomain.com/repo $ cd /var/www/htdocs/git.mydomain.com/repo
Create symlinks for the stylesheet, logo and favicon inside the directory you just created:
# ln -s ../style.css ../logo.png ../favicon.png .
stagit(1) and generate the static
page for your repository. This has to be done
inside the directory you just created since
stores the files in the working directory. Make sure that you give it
.git directory (i.e the actual repository):
# stagit ../repo.git
Go to the top-level Git directory and generate an
index.html file which
is your Git server's homepage where all repositories
will be listed. Again, you give it the actual repositories:
$ cd /var/www/htdocs/git.mydomain.com # stagit-index repo.git > index.html
Fire up a browser and go to
git.mydomain.com and you
should see everything. Success!