-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-slides-docker.sh
executable file
·65 lines (51 loc) · 2.19 KB
/
build-slides-docker.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
set -e
BUILD_DIR="gh-pages"
REVEAL_DIR="asciidocs-slides"
[ ! -d "./asciidocs-slides/revealjs" ] && source ./download-reveal.sh
rm -rf -v $BUILD_DIR # else plantuml diagrams won't be rebuilt
cp -r -p -v $REVEAL_DIR $BUILD_DIR
[ -d "./src" ] && cp -r -p -v src $BUILD_DIR
echo "Rendering slides"
docker run --rm \
-v ${PWD}/$BUILD_DIR:/documents \
asciidoctor/docker-asciidoctor:1.11.0 asciidoctor-revealjs \
-r asciidoctor-diagram \
-a icons=font \
-a experimental=true \
-a revealjs_theme=white \
-a source-highlighter=highlightjs \
-a imagesdir=images \
-a revealjsdir=revealjs \
-a revealjs_slideNumber=c/t \
-a revealjs_transition=slide \
-a revealjs_hash=true \
-a sourcedir=src/main/java \
-b revealjs \
'*.adoc'
echo "build completed ..."
# Source: https://github.com/bentolor/java9to13/blob/master/docs/render
### Hier könnte man einen lokalen Python-Server starten, um sich die Präsentation lokal anzusehen
# echo http://localhost:8000/demo-slides.html
# echo "Starting Webserver on :8000"
# python3 -m http.server --directory $BUILD_DIR >/dev/null 2>&1 &
# ps aux | grep http.server
# echo "kill -9 <pid>" to shut down the webserver
### for macOS
#open -a Google\ Chrome http://localhost:8000/demo-slides.html > /dev/null &
#open http://localhost:8000/demo-slides.html > /dev/null &
# ps
# kill -9 <process number>
# Tolles Beispiel
# https://bentolor.github.io/java9to13
# https://github.com/bentolor/java9to13/blob/master/docs/render
# https://asciidoctor.org/docs/asciidoctor-revealjs/
# revealjs_theme=[beige, black, league, night, serif, simple, sky, solarized, white]
# revealjs_transition [none, fade, slide, convex, concave, zoom]
# source-highlighter [highlightjs,rouge,coderay,prettify]
# https://asciidoctor.org/docs/user-manual/#highlight-js
# -a highlightjs-theme=github \
# -a highlightjsdir=highlight \
# -a highlightjs-languages=java,yaml,json,asciidoc \
# -a highlightjsdir=https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build \
# Cheat Sheet
# https://powerman.name/doc/asciidoc