19 lines
748 B
Bash
Executable File
19 lines
748 B
Bash
Executable File
#! /usr/bin/env bash
|
|
HIGHLIGHT_STYLE=tango
|
|
SLIDE_LEVEL=2
|
|
|
|
my_header=$(<./templates/html_header.md)
|
|
headEscapedForSed=${my_header//$'\n'/\\$'\n'}
|
|
|
|
for filename in $*
|
|
do
|
|
echo compiling $filename
|
|
file_out=`echo $filename | sed -e 's/\.md/\.html/g'`
|
|
sed -e "s|SLIDEHEAD|$headEscapedForSed|g" $filename | pandoc -s --mathjax="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS_HTML" -t revealjs -o html/$file_out --slide-level=$SLIDE_LEVEL --highlight-style=$HIGHLIGHT_STYLE -V revealjs-url=https://unpkg.com/reveal.js@5.2.0 --template=./templates/template.revealjs --css=./custom.css --toc --toc-depth=1
|
|
if [ -f ./templates/custom.css ]; then
|
|
cp -n ./templates/custom.css ./html/custom.css
|
|
fi
|
|
echo output $file_out
|
|
|
|
done
|