diff options
author | June McEnroe <june@causal.agency> | 2020-09-12 07:02:14 +0000 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-09-12 07:03:28 +0000 |
commit | 287698d0e25c5388de5912254d35628ec56e0bd1 (patch) | |
tree | 3577ea0af9f2ba4022c1b9d774cd7e4c49e0015e /www/git.causal.agency/about-filter.sh | |
parent | Install mandoc on macOS (diff) | |
download | src-287698d0e25c5388de5912254d35628ec56e0bd1.tar.gz src-287698d0e25c5388de5912254d35628ec56e0bd1.zip |
Enable toc in cgit renderings of man pages
But keep it disabled for READMEs since they always use non-standard sections and the TOC is just distracting there, I think. Also add the style so its h1 is the same size as the ones inside sections...
Diffstat (limited to 'www/git.causal.agency/about-filter.sh')
-rw-r--r-- | www/git.causal.agency/about-filter.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/www/git.causal.agency/about-filter.sh b/www/git.causal.agency/about-filter.sh index ea68fe05..d27d2d48 100644 --- a/www/git.causal.agency/about-filter.sh +++ b/www/git.causal.agency/about-filter.sh @@ -1,8 +1,13 @@ #!/bin/sh +options=fragment,man=%N.%S,includes=../tree/%I + case "$1" in + (README.[1-9]) + exec /usr/bin/mandoc -T html -O $options + ;; (*.[1-9]) - exec /usr/bin/mandoc -T html -O fragment,man=%N.%S,includes=../tree/%I + exec /usr/bin/mandoc -T html -O $options,toc ;; (*) exec /usr/local/libexec/hi -l text -f html |