diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-02-12 20:45:58 +0100 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-02-12 21:00:39 +0100 |
| commit | 58181e629a5d51eaee7f6ad08fcbda4411b22d19 (patch) | |
| tree | afac1586dfb7cdf0717eea7d8d36a05725d0f835 /examples | |
| download | cgit-58181e629a5d51eaee7f6ad08fcbda4411b22d19.tar.gz cgit-58181e629a5d51eaee7f6ad08fcbda4411b22d19.zip | |
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/about.md | 3 | ||||
| -rw-r--r-- | examples/cgitrc | 47 | ||||
| -rwxr-xr-x | examples/commit-filter.sh | 11 |
3 files changed, 61 insertions, 0 deletions
diff --git a/examples/about.md b/examples/about.md new file mode 100644 index 0000000..34e5902 --- /dev/null +++ b/examples/about.md @@ -0,0 +1,3 @@ +# tvcloud.fr + +Edit this in `about.md`. diff --git a/examples/cgitrc b/examples/cgitrc new file mode 100644 index 0000000..631feaa --- /dev/null +++ b/examples/cgitrc @@ -0,0 +1,47 @@ +# +# Global +# +css=/cgit.css +logo=/cgit.png +# Formatters +source-filter=/usr/local/lib/cgit/filters/syntax-highlighting.py +about-filter=/usr/local/lib/cgit/filters/about-formatting.sh +commit-filter=/usr/local/lib/cgit/filters/commit/commit-filter.sh +# Mimetypes (for plain blobs) +mimetype.gif=image/gif +mimetype.html=text/html +mimetype.jpg=image/jpeg +mimetype.jpeg=image/jpeg +mimetype.pdf=application/pdf +mimetype.png=image/png +mimetype.svg=image/svg+xml + +# +# Cache +# +cache-size=1000 + +# +# Index +# +root-title=Edit this in cgitrc +root-desc=Edit this in cgitrc +root-readme=/srv/cgit/about.md +favicon=/favicon.ico + +# +# Repositories +# +enable-index-owner=1 +enable-index-links=1 +enable-commit-graph=1 +enable-log-filecount=1 +enable-log-linecount=1 +repository-sort=age +remove-suffix=1 +max-stats=year +snapshots=tar.gz zip +clone-url=http://localhost:8080/$CGIT_REPO_URL +readme=:readme.md +# This setting must be set last because settings set after repos are scanned are not applied +scan-path=/srv/git diff --git a/examples/commit-filter.sh b/examples/commit-filter.sh new file mode 100755 index 0000000..3b6dbd2 --- /dev/null +++ b/examples/commit-filter.sh @@ -0,0 +1,11 @@ +regex='' + +# This expression generates links to commits referenced by their SHA1. +regex=$regex' +s|\b([0-9a-fA-F]{7,64})\b|<a href="./?id=\1">\1</a>|g' + +# This expression generates links to a fictional bugtracker. +regex=$regex' +s|#([0-9]+)\b|<a href="http://bugs.example.com/?bug=\1">#\1</a>|g' + +sed -re "$regex" |
