diff options
Diffstat (limited to 'tools/markdown/reveal')
-rwxr-xr-x | tools/markdown/reveal | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/markdown/reveal b/tools/markdown/reveal index 17321d5..c6bf97b 100755 --- a/tools/markdown/reveal +++ b/tools/markdown/reveal | |||
@@ -1,6 +1,6 @@ | |||
1 | #! /bin/bash | 1 | #! /bin/bash |
2 | 2 | ||
3 | if [[ ! $1 =~ (.md|.slide)$ ]]; then | 3 | if [[ ! $1 =~ (.md|.slide)$ || ! -e $1 ]]; then |
4 | echo markdown file is not given >&2 | 4 | echo markdown file is not given >&2 |
5 | exit 1 | 5 | exit 1 |
6 | fi | 6 | fi |
@@ -26,12 +26,20 @@ THEME=${THEME:-serif} | |||
26 | # tomorrow-night-bright vs2015 vs xcode xt256 | 26 | # tomorrow-night-bright vs2015 vs xcode xt256 |
27 | HIGHLIGHT_THEME=${HIGHLIGHT_THEME:-base16/zenburn} | 27 | HIGHLIGHT_THEME=${HIGHLIGHT_THEME:-base16/zenburn} |
28 | 28 | ||
29 | |||
30 | if [[ $1 =~ / ]]; then | ||
31 | DIR="`dirname $1`" | ||
32 | else | ||
33 | DIR="`pwd`" | ||
34 | fi | ||
35 | |||
36 | set -x | ||
29 | docker run --rm \ | 37 | docker run --rm \ |
30 | -u `id -u`:`id -g` \ | 38 | -u `id -u`:`id -g` \ |
31 | -v `pwd`:/slides \ | 39 | -v "$DIR":/slides \ |
32 | -p 1948:1948 \ | 40 | -p 1948:1948 \ |
33 | webpronl/reveal-md:5.3.4 \ | 41 | webpronl/reveal-md:5.3.4 \ |
34 | $1 \ | 42 | `basename $1` \ |
35 | --static /slides \ | 43 | --static /slides \ |
36 | #--theme ${THEME} \ | 44 | #--theme ${THEME} \ |
37 | #--highlight-theme ${HIGHLIGHT_THEME} \ | 45 | #--highlight-theme ${HIGHLIGHT_THEME} \ |