Update site, fix scripts, block more AIs

This commit is contained in:
askiiart 2023-10-10 10:13:11 -05:00
parent e53b59a94b
commit e68cacf15c
No known key found for this signature in database
GPG key ID: 1C6E779EF11B3271
16 changed files with 69 additions and 62 deletions

View file

@ -1,10 +1,11 @@
#!/usr/bin/env bash
set -e
git status --porcelain | awk 'match($1, "(M|A|\?\?)"){print $2}' | while read -r item; do
if [[ ${item} == *.md ]]; then
item="${item%.*}"
echo "Currently processing ${item}"
pandoc -f markdown-smart --data-dir . --template ${dir}/template.html -t html -o ${item}.html ${item}.md --metadata title="$(grep -m 1 -oP '(?<=^# ).*' ${item}.md | cat)"
fi
dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
find . -name "*.md" | while read -r item; do
item="${item%.*}"
echo "Currently processing ${item}"
pandoc -f markdown-smart --data-dir . --template ${dir}/template.html -t html -o ${item}.html ${item}.md --metadata title="$(grep -m 1 -oP '(?<=^# ).*' ${item}.md | cat)"
done
find . \( ! -regex './md2html.sh' \) -type f | xargs sed -i 's/sourceCode /language-/g'