Files
slide_example/scripts/slides_to_html.sh

16 lines
540 B
Bash
Raw Normal View History

2024-04-21 18:55:28 +02:00
#! /usr/bin/env bash
HIGHLIGHT_STYLE=tango
SLIDE_LEVEL=2
my_header=$(<./templates/html_header.md)
headEscapedForSed=${my_header//$'\n'/\\$'\n'}
2024-08-03 19:12:42 +02:00
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 -t revealjs -o html/$file_out --slide-level=$SLIDE_LEVEL --highlight-style=$HIGHLIGHT_STYLE -V revealjs-url=https://unpkg.com/reveal.js@5.0.0 --template=./templates/template.revealjs
echo output $file_out
done