summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--www/git.causal.agency/Makefile2
-rw-r--r--www/git.causal.agency/about-filter.sh13
-rw-r--r--www/git.causal.agency/cgitrc2
-rw-r--r--www/git.causal.agency/custom.css4
-rw-r--r--www/git.causal.agency/source-filter.sh6
5 files changed, 21 insertions, 6 deletions
diff --git a/www/git.causal.agency/Makefile b/www/git.causal.agency/Makefile
index bba51f40..8b87920f 100644
--- a/www/git.causal.agency/Makefile
+++ b/www/git.causal.agency/Makefile
@@ -3,7 +3,7 @@ WWW = /usr/local/www/cgit
 LIBEXEC = /usr/local/libexec
 
 BIN = ../../bin
-BINS = source-filter ttpre hi
+BINS = about-filter source-filter ttpre hi
 
 install: cgitrc custom.css ${BINS}
 	install -m 644 cgitrc ${ETC}
diff --git a/www/git.causal.agency/about-filter.sh b/www/git.causal.agency/about-filter.sh
new file mode 100644
index 00000000..216c86e9
--- /dev/null
+++ b/www/git.causal.agency/about-filter.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+case "$1" in
+	(*.[1-9])
+		/usr/bin/mandoc -T utf8 \
+			| /usr/local/libexec/ttpre \
+			| /usr/bin/sed -E \
+				's,([a-z0-9_-]+)[(]([1-9])[)],<a href="\1.\2">&</a>,g'
+		;;
+	(*)
+		exec /usr/local/libexec/hi -l text -f html
+		;;
+esac
diff --git a/www/git.causal.agency/cgitrc b/www/git.causal.agency/cgitrc
index 4a1aa904..0578ecbb 100644
--- a/www/git.causal.agency/cgitrc
+++ b/www/git.causal.agency/cgitrc
@@ -14,7 +14,7 @@ branch-sort=age
 
 css=/custom.css
 email-filter=/usr/local/libexec/cgit-email
-about-filter=/usr/local/libexec/source-filter
+about-filter=/usr/local/libexec/about-filter
 source-filter=/usr/local/libexec/source-filter
 
 readme=:README.7
diff --git a/www/git.causal.agency/custom.css b/www/git.causal.agency/custom.css
index 66cdc185..a5095054 100644
--- a/www/git.causal.agency/custom.css
+++ b/www/git.causal.agency/custom.css
@@ -35,6 +35,10 @@ div#cgit table.list tr.nohover-highlight:hover:nth-child(even) {
 	background: inherit;
 }
 
+div#cgit table.blob td.linenumbers:nth-last-child(3) {
+	display: none;
+}
+
 div#cgit table.blob td.linenumbers a:target {
 	color: goldenrod;
 	text-decoration: underline;
diff --git a/www/git.causal.agency/source-filter.sh b/www/git.causal.agency/source-filter.sh
index ce9e3f8b..868859b4 100644
--- a/www/git.causal.agency/source-filter.sh
+++ b/www/git.causal.agency/source-filter.sh
@@ -2,10 +2,8 @@
 
 case "$1" in
 	(*.[1-9])
-		/usr/bin/mandoc -T utf8 \
-			| /usr/local/libexec/ttpre \
-			| /usr/bin/sed -E \
-				's,([a-z0-9_-]+)[(]([1-9])[)],<a href="\1.\2">&</a>,g'
+		/usr/local/libexec/about-filter "$@"
+		printf '</code></pre></td><td><pre><code>'
 		;;
 	(*)
 		exec /usr/local/libexec/hi -t -n "$1" -f html -o anchor
d>Match Sh and Ss as Tag in mdocJune McEnroe 2019-02-18Match statics and typedefs as TagJune McEnroe 2019-02-18Clean up htmlHeaderJune McEnroe 2019-02-18Remove hi line numberingJune McEnroe Tags are much better for referring to specific parts of a file and line numbering is better done by a post-processing tool such as cat -n or producing a two-column HTML <table>. 2019-02-18Add Tag class to hiJune McEnroe 2019-02-17Generate HTML with hi -n -f html -o anchorJune McEnroe Running hi twice to insert stuff between the head and the content is a bit of a hack but oh well. 2019-02-17Add hi -f html -o anchor for line number linksJune McEnroe 2019-02-17Simplify temp trap in upJune McEnroe 2019-02-17Add line numbers to hiJune McEnroe Renames previous -n option to -m to stay consistent with cat -n. Prefixing lines with line numbers affects where the first tab indent ends up relative to the text above it. Not sure if it's worth fixing somehow. 2019-02-17Always split spans after newlinesJune McEnroe Simplifies ANSI and IRC output code, and prepares for line numbered output. 2019-02-15Color format specifiers light cyan in vimJune McEnroe 2019-02-15Highlight Interp as yellowJune McEnroe 2019-02-15Highlight strings in sh command substitutionsJune McEnroe 2019-02-15Add nmap gpJune McEnroe 2019-02-14Avoid newline when copying URL to pasteboardJune McEnroe 2019-02-13Add forgotten "sixth" book of H2G2June McEnroe