Rewrite jpg to svg in HTML build process

This commit is contained in:
Matt McWilliams 2022-08-04 14:40:53 -04:00
parent 69ead51f15
commit 9a2d133004
1 changed files with 11 additions and 1 deletions

View File

@ -5,4 +5,14 @@ mkdir -p html
pandoc -o pdf/NOTES_ON_OPTICAL_PRINTER_TECHNIQUE.pdf -f markdown+implicit_figures NOTES_ON_OPTICAL_PRINTER_TECHNIQUE.md
pandoc --css=style.css -o html/index.html -t html -f markdown+implicit_figures NOTES_ON_OPTICAL_PRINTER_TECHNIQUE.md
MARKDOWN="$(cat NOTES_ON_OPTICAL_PRINTER_TECHNIQUE.md)"
HTML_TMP=$(mktemp -d)
SVG="${MARKDOWN//.jpg/.svg}"
SVG="${SVG//img\//..\/img\/}"
echo "${SVG}" > "${HTML_TMP}/index.md"
pandoc --css=style.css -o html/index.html -t html -f markdown+implicit_figures "${HTML_TMP}/index.md"
rm -r "${HTML_TMP}"