-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-slides.sh
executable file
·36 lines (28 loc) · 1.31 KB
/
build-slides.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
ASCIIDOCTOR_DOCKER_IMAGE="asciidoctor/docker-asciidoctor:1.61.0"
REVEALJS_DIR="https://cdn.jsdelivr.net/npm/[email protected]"
CONFERENCES=("webinar" "bdxio" "capitoledulibre" "scalaio" "devoxxfrance")
cat summary.adoc > index.adoc
rm -rf public
mkdir -p public
for conf in "${CONFERENCES[@]}"
do
sourceCss=$([[ -f "custom-${conf}.css" ]] && echo "custom-${conf}.css" || echo "custom.css")
CONFERENCE_PNG_BASE64=$(cat images/logo-${conf}.png | base64 -w0) \
QRCODE_PNG_BASE64=$(cat images/qrcode-slides.png | base64 -w0) \
envsubst < ${sourceCss} > public/custom-${conf}.css
docker run --name $(uuidgen) --rm -u $(id -u):$(id -g) -v $(pwd):/documents ${ASCIIDOCTOR_DOCKER_IMAGE} \
asciidoctor-revealjs -a data-uri -a revealjs_theme=simple \
-a conf-${conf} -a confname=${conf} \
-a revealjsdir=${REVEALJS_DIR} -a revealjs_transition=fade \
-a customcss=custom-${conf}.css -a revealjs_slideNumber=true \
-D public -o index-${conf}.html \
presentation_en.adoc
echo "* link:index-${conf}.html[${conf}^]" >> index.adoc
done
cat videos.adoc >> index.adoc
touch public/.nojekyll
cp -r sounds public/
docker run --rm --name $(uuidgen) -u $(id -u):$(id -g) -v $(pwd):/documents ${ASCIIDOCTOR_DOCKER_IMAGE} \
asciidoctor -a data-uri -D public -o index.html index.adoc
rm index.adoc