Compare commits

...

2 commits

2 changed files with 7 additions and 1 deletions

View file

@ -225,7 +225,7 @@ build-docs-pdf: ## build pdf docs only
--site-dir $(BUILD_DOCS_DIR)
pdftk \
$$(find $(BUILD_DOCS_DIR) -name *.pdf -not -name index.pdf |sort ) \
cat output $(BUILD_DOCS_DIR)/combined.pdf
cat output $(BUILD_DOCS_DIR)/docs.pdf
build-docs-html: ## build static docs site only
mkdir -p $(BUILD_DOCS_DIR)

View file

@ -69,6 +69,7 @@ echo "basedir = $BASEDIR"
echo "docker_image = $DOCKER_IMAGE"
echo "action = $ACTION"
## Detect Marp SCSS
if [ -f "$BASEDIR/.marp/theme.scss" ]; then
DOCKER_OPT_MARP_THEME="-v $BASEDIR/.marp:/app/.marp"
echo "Theme: detected Marp files. Adding option to command line ($DOCKER_OPT_MARP_THEME)"
@ -76,11 +77,13 @@ else
echo "Theme: no theme detected. Using default files"
fi
## Detect Mkdocs configuration - old format (full)
if [ -f "$BASEDIR/mkdocs.yml" ]; then
>&2 echo "Mkdocs: detected mkdocs.yml file. Please rename to mkdocs-patch.yml"
exit 1
fi
## Detect Mkdocs configuration - new format (patch)
if [ -f "$BASEDIR/mkdocs-patch.yml" ]; then
DOCKER_OPT_MKDOCS_CONFIG="-v $BASEDIR/mkdocs-patch.yml:/app/mkdocs-patch.yml"
echo "Mkdocs: detected mkdocs-patch.yml file. Adding option to command line ($DOCKER_OPT_MKDOCS_CONFIG)"
@ -88,10 +91,12 @@ else
echo "Mkdocs: no mkdocs-patch.yml detected. Using default files"
fi
## Detect slides
if [ -d "$BASEDIR/slides" ]; then
DOCKER_OPT_MARP_PORT="-p 5200:5200"
fi
## Detect docs
if [ -d "$BASEDIR/docs" ]; then
DOCKER_OPT_MKDOCS_PORT="-p 5100:5100"
fi
@ -112,6 +117,7 @@ docker run -i $DOCKER_OPT_TTY \
$DOCKER_OPT_MKDOCS_PORT \
$DOCKER_OPT_MARP_PORT \
"$DOCKER_IMAGE" "$ACTION"
if [ "$VERBOSITY" -gt 0 ]; then
set +x
fi