web/scripts/web.sh
milovann dffbad640f
All checks were successful
/ publish (push) Successful in 1m18s
up
2024-12-05 12:13:39 +01:00

22 lines
369 B
Bash
Executable file

#!/bin/bash
convert()
{
file=$1
filename=$(basename -- "$file")
extension="${filename##*.}"
filename="${filename%.*}"
if [[ -f ../pages/$filename.md ]]
then
echo "making $filename.html"
pandoc -s ../pages/$filename.md -t html > ../dist/$filename.html --lua-filter=links-to-html.lua
fi
}
case $1 in
convert) shift 1; convert "$@";;
*) echo "?" ;;
esac