aboutsummaryrefslogtreecommitdiff
path: root/custom/about-filter.sh
blob: 80456daa55f199590f8e6e6b6ac99280edf0e477 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

case "$1" in
*.md)
	lowdown --html-no-skiphtml --html-no-escapehtml
	;;
*.html)
	cat -
	;;
*)
	# Copied from default cgit txt2html filter, with added id for styling
	echo "<pre id=\"nobox\">"
	sed "s|&|\\&amp;|g;s|'|\\&apos;|g;s|\"|\\&quot;|g;s|<|\\&lt;|g;s|>|\\&gt;|g"
	echo "</pre id=\"nobox\">"
	;;
esac

Generated with cgit - Back to sebastiano.tronto.net