From 66b54db812b01f5b944b0e5694a1473bdbcbaf32 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Mon, 31 Aug 2026 17:10:07 +0200 Subject: Initial commit --- cgitrc | 116 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 cgitrc (limited to 'cgitrc') diff --git a/cgitrc b/cgitrc new file mode 100644 index 0000000..c277991 --- /dev/null +++ b/cgitrc @@ -0,0 +1,116 @@ +virtual-root=/ + +####################################################################### +# General HTML customization +####################################################################### + +# My logo, favicon and css served with every page. The favicon can be +# in either .png or .ico format. For the CSS I started by copying the +# default cgit.css and made some changes from there. +# The path is relative to cgit's folder. +logo=/custom/cgit.png +favicon=/custom/favicon.png +css=/custom/cgit.css + +# Custom pieces of HTML added to every page, at the top and and the +# bottom respectively. My header currently contains only one tag +# for better view on small screens. The footer is a custom signature +# with link to my main website. +# Note that we need to specify the full path, because this file is read +# by cgit, not served directly by the web server (lighttpd). +head-include=/usr/share/webapps/cgit/custom/head.html +footer=/usr/share/webapps/cgit/custom/footer.html + +####################################################################### +# Main page customization +####################################################################### + +# Title and description +root-title=Sebastiano's repositories +root-desc= + +# Contents of the about page for the main page. Full path needed. +root-readme=/usr/share/webapps/cgit/custom/README.html + +# Bare git repositories are, by convention, in folders that end in +# .git. This option removes the suffix from the repository name in the +# main page. +remove-suffix=1 + +# Do not show repository owner name (it is always me). +enable-index-owner=0 + +# Disable extra "links" column in the repository list. This is the +# default, but I want to be explicit. +enable-index-links=0 + +# Show all repositories in one page. +max-repo-count=0 + +# Sort repository list by name. This is the default setting, but I want +# to be explicit. +repository-sort="name" + +####################################################################### +# About (README) page configuration +####################################################################### + +# Path to our custom "about filter". It uses lowdown for Markdown files +# and the default txt2html filter shipped with cgit (inlined into the +# custom script) for plain text files. +about-filter=/usr/share/webapps/cgit/custom/about-filter.sh + +# Possible README files. I never use anything other than one of these +# three. If necessary, the file name can be prefixed by the branch +# name, e.g. main:README.md. +readme=:README.md +readme=:README.txt +readme=:README + +####################################################################### +# Repository page configuration +####################################################################### + +# Sort branches by age instead of name. +branch-sort="age" + +# Sort files in the repository case-sensitively. This is the default +# setting, but I want to make it explicit. +case-sensitive-sort=1 + +# Show correct URL for cloning the repository. +clone-prefix=https://git.tronto.net + +# Generate graphical overview of deleted / added lines for each commit. +enable-commit-graph=1 + +# Turn file names into links in the log view. +enable-follow-links=1 + +# Show number of files and number of lines modified in each commit log. +enable-log-filecount=1 +enable-log-linecount=1 + +# Show diffs side by side instead of "unidiffs". +side-by-side-diffs=1 + +# Generate download links for tar.gz and zip archives of each tag. +# I would like them for the current state of the repo (master branch) +# too, but it does not seem to be possible with cgit. +snapshots=tar.gz zip + +####################################################################### +# Cache settings +####################################################################### + +# Global cache size setting. By default, cache is disabled. +cache-size=1000 + +####################################################################### +# Scan path +####################################################################### + +# The folder that contains all my git repositories. Since some other +# settings must be placed before this one in order to be picked up +# correctly, we put it at the bottom of this file. +scan-path=/home/git -- cgit v1.3