Disable marp theme if not needed

This commit is contained in:
Glenn Y. Rolland 2021-11-24 19:35:20 +01:00
parent 84783f1454
commit ee60b803db

View file

@ -12,11 +12,18 @@ echo "basedir = $BASEDIR"
echo "docker_image = $DOCKER_IMAGE" echo "docker_image = $DOCKER_IMAGE"
echo "action = $ACTION" echo "action = $ACTION"
if [ -f "$BASEDIR/.marp/theme.css" ]; then
DOCKER_OPT_MARP_THEME="-v $BASEDIR/.marp:/app/.marp"
echo "Detected Marp theme. Adding option to command line ($DOCKER_OPT_MARP_THEME)"
fi
docker run -it \ docker run -it \
-v "$BASEDIR/docs:/app/docs" \ -v "$BASEDIR/docs:/app/docs" \
-v "$BASEDIR/slides:/app/slides" \ -v "$BASEDIR/slides:/app/slides" \
-v "$BASEDIR/_build:/app/_build" \ -v "$BASEDIR/_build:/app/_build" \
-v "$BASEDIR/mkdocs.yml:/app/mkdocs.yml" \ -v "$BASEDIR/mkdocs.yml:/app/mkdocs.yml" \
$DOCKER_OPT_MARP_THEME \
-v "$BASEDIR/.marp:/app/.marp" \ -v "$BASEDIR/.marp:/app/.marp" \
-p 5200:5200 \ -p 5200:5200 \
-p 5100:5100 \ -p 5100:5100 \