diff options
author | 2025-01-15 13:48:32 +0100 | |
---|---|---|
committer | 2025-01-15 13:48:32 +0100 | |
commit | 6f080713489cfc11bfc4fc77b57ea9398bef424b (patch) | |
tree | 35fc2a7e96aba5fc5159b2b664e105fde2b47da7 /image | |
parent | ed7a5cfe5508f3b7b1f79149c4436679b191f4fd (diff) | |
download | cgit-oci-6f080713489cfc11bfc4fc77b57ea9398bef424b.tar.gz cgit-oci-6f080713489cfc11bfc4fc77b57ea9398bef424b.tar.bz2 cgit-oci-6f080713489cfc11bfc4fc77b57ea9398bef424b.tar.lz cgit-oci-6f080713489cfc11bfc4fc77b57ea9398bef424b.zip |
feat: things!! :3
Diffstat (limited to 'image')
-rw-r--r-- | image/Caddyfile | 2 | ||||
-rw-r--r-- | image/cgitrc | 7 | ||||
-rwxr-xr-x | image/filters/about-formatting | 27 | ||||
-rwxr-xr-x[-rw-r--r--] | image/filters/email-libravatar.lua | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | image/filters/syntax-highlighting.sh | 0 |
5 files changed, 34 insertions, 2 deletions
diff --git a/image/Caddyfile b/image/Caddyfile index 56f89a0..82e6020 100644 --- a/image/Caddyfile +++ b/image/Caddyfile @@ -17,6 +17,8 @@ http:// { } } + # you may want to handle /assets/md.css (for example doing a rewrite to /cgit-assets.git/plain/markdown.css) if you use the default markdown handler + reverse_proxy unix//run/fcgiwrap/fcgiwrap.sock { transport fastcgi { env DOCUMENT_ROOT /usr/share/webapps/cgit diff --git a/image/cgitrc b/image/cgitrc index 61a5944..6214b74 100644 --- a/image/cgitrc +++ b/image/cgitrc @@ -9,7 +9,7 @@ cache-size=1000 # The clone prefixes, used to show the user where to clone from clone-prefix=https://git.estrogen.zone ssh://git@git.estrogen.zone -# Use /cgit.css or https://git.estrogen.zone/cgit-assets.git/plain/cgit.css if you don't have this repo available +# Use /cgit.css or https://git.estrogen.zone/cgit-assets.git/plain/cgit.css if you don't have this repo on your cgit css=/cgit-assets.git/plain/cgit.css # Specify your own icon's URL here @@ -55,9 +55,12 @@ readme=:README.rst readme=:readme.rst readme=:README.md readme=:readme.md +readme=:README.txt +readme=:readme.txt readme=:README readme=:readme #readme=:README.html +#readme=:readme.html # if cgit messes up links, use a virtual-root. For example, cgit.example.org/ has this value: virtual-root=/ @@ -89,7 +92,7 @@ email-filter=lua:/usr/lib/cgit/filters/extra/email-libravatar.lua # commit-filter=exec:/usr/lib/cgit/filters/extra/commit.sh # Handle the about pages -about-filter=/usr/lib/cgit/filters/about-formatting.sh +about-filter=/usr/lib/cgit/filters/extra/about-formatting.sh # Handle syntax highlighting source-filter=/usr/lib/cgit/filters/syntax-highlighting-uwu.sh diff --git a/image/filters/about-formatting b/image/filters/about-formatting new file mode 100755 index 0000000..edc7ec2 --- /dev/null +++ b/image/filters/about-formatting @@ -0,0 +1,27 @@ +#!/bin/sh + +# This may be used with the about-filter or repo.about-filter setting in cgitrc. +# It passes formatting of about pages to differing programs, depending on the usage. + +# Markdown support requires python and markdown-python. +# RestructuredText support requires python and docutils. +# Man page support requires groff. + +# The following environment variables can be used to retrieve the configuration +# of the repository for which this script is called: +# CGIT_REPO_URL ( = repo.url setting ) +# CGIT_REPO_NAME ( = repo.name setting ) +# CGIT_REPO_PATH ( = repo.path setting ) +# CGIT_REPO_OWNER ( = repo.owner setting ) +# CGIT_REPO_DEFBRANCH ( = repo.defbranch setting ) +# CGIT_REPO_SECTION ( = section setting ) +# CGIT_REPO_CLONE_URL ( = repo.clone-url setting ) + +cd "$(dirname $0)/html-converters/" +case "$(printf '%s' "$1" | tr '[:upper:]' '[:lower:]')" in + *.markdown|*.mdown|*.md|*.mkd) exec /usr/bin/markdown-tool; ;; + *.rst) exec ./rst2html; ;; + *.[1-9]) exec ./man2html; ;; + *.htm|*.html) exec cat; ;; + *.txt|*) exec ./txt2html; ;; +esac diff --git a/image/filters/email-libravatar.lua b/image/filters/email-libravatar.lua index 5e8554e..5e8554e 100644..100755 --- a/image/filters/email-libravatar.lua +++ b/image/filters/email-libravatar.lua diff --git a/image/filters/syntax-highlighting.sh b/image/filters/syntax-highlighting.sh index 46ad2bb..46ad2bb 100644..100755 --- a/image/filters/syntax-highlighting.sh +++ b/image/filters/syntax-highlighting.sh |