diff options
Diffstat (limited to 'custom/about-filter.sh')
| -rwxr-xr-x | custom/about-filter.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/custom/about-filter.sh b/custom/about-filter.sh new file mode 100755 index 0000000..80456da --- /dev/null +++ b/custom/about-filter.sh | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | case "$1" in | ||
| 4 | *.md) | ||
| 5 | lowdown --html-no-skiphtml --html-no-escapehtml | ||
| 6 | ;; | ||
| 7 | *.html) | ||
| 8 | cat - | ||
| 9 | ;; | ||
| 10 | *) | ||
| 11 | # Copied from default cgit txt2html filter, with added id for styling | ||
| 12 | echo "<pre id=\"nobox\">" | ||
| 13 | sed "s|&|\\&|g;s|'|\\'|g;s|\"|\\"|g;s|<|\\<|g;s|>|\\>|g" | ||
| 14 | echo "</pre id=\"nobox\">" | ||
| 15 | ;; | ||
| 16 | esac | ||
