diff --git a/scripts/build.sh b/scripts/build.sh index c44ac41..865f374 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -36,6 +36,12 @@ cp slides/index.html "$out/slides/" marp() { npx --yes "@marp-team/marp-cli@${MARP_VERSION}" "$@"; } +# The same icons as the static pages. Marp has no option for , so they are +# put in after rendering. +icons='' +icons+='' +icons+='' + for src in slides/*/index.md; do deck=$(basename "$(dirname "$src")") mkdir -p "$out/slides/$deck" @@ -43,6 +49,9 @@ for src in slides/*/index.md; do # --html: the decks use inline
and for layout, which Marp # strips unless raw HTML is allowed. marp --html "$src" -o "$out/slides/$deck/index.html" + sed -i "s##${icons}#" "$out/slides/$deck/index.html" + grep -q 'href="/icon.svg"' "$out/slides/$deck/index.html" \ + || { echo "FATAL: no icons in $deck" >&2; exit 1; } marp --html "$src" --pdf -o "$out/slides/$deck/$deck.pdf" done