diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2021-06-29 18:41:59 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2021-06-29 18:41:59 +0200 |
commit | 33019276818542ac0513d60228ff48b192c5067f (patch) | |
tree | ff48b872460e8732fa64111ac0f58ef1998fc5b2 /files/filters/hugo-pre.sh | |
download | cgit-33019276818542ac0513d60228ff48b192c5067f.tar.gz cgit-33019276818542ac0513d60228ff48b192c5067f.tar.xz |
Initial commit.
Diffstat (limited to '')
-rwxr-xr-x | files/filters/hugo-pre.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/files/filters/hugo-pre.sh b/files/filters/hugo-pre.sh new file mode 100755 index 0000000..de94b26 --- /dev/null +++ b/files/filters/hugo-pre.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +name=$1 + +extension=${1: -3} + +case $extension in + .md) markdown ;; + *) + cat <<- EOF + <pre>$(cat -)</pre> + EOF + ;; +esac + |