feat: add notes
This commit is contained in:
18
notes/make-views.sh
Executable file
18
notes/make-views.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e;
|
||||
|
||||
MYSELF=$(realpath "$0");
|
||||
MYDIR=$(dirname "$MYSELF");
|
||||
|
||||
PRE_IMPORT=${PRE_IMPORT:-/components/md-pre.html}
|
||||
POST_IMPORT=${POST_IMPORT:-/components/md-post.html}
|
||||
|
||||
find "${1-$MYDIR}" -iname '*.md' | while read -r line; do
|
||||
# target=${line//\.md/.html}
|
||||
target=$(sed 's/\.md$/\.html/' <<< "$line")
|
||||
|
||||
echo "$line -> $target";
|
||||
echo "<!--# include virtual=\"$PRE_IMPORT\" -->" > "$target"
|
||||
pandoc --mathml "$line" -o - >> "$target"
|
||||
echo "<!--# include virtual=\"$POST_IMPORT\" -->" >> "$target"
|
||||
done
|
||||
Reference in New Issue
Block a user