Update site, fix scripts, block more AIs
This commit is contained in:
parent
e53b59a94b
commit
e68cacf15c
16 changed files with 69 additions and 62 deletions
13
md2html.sh
13
md2html.sh
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue