2020-11-26 17:38:25 +00:00
|
|
|
# Makefile for MkDocs documentation
|
|
|
|
#
|
|
|
|
|
2020-11-26 18:34:09 +00:00
|
|
|
INCLUDE_ITEM= IT Checklist Divers Cuisine
|
2020-11-26 17:38:25 +00:00
|
|
|
|
|
|
|
# You can set these variables from the command line.
|
|
|
|
BUILDDIR ?= _build/html
|
|
|
|
DOCFOLDER = _docs
|
|
|
|
MKDOCS = mkdocs
|
|
|
|
MKDOCSBUILDOPTS = --clean --strict --verbose
|
|
|
|
MKDOCSBUILD = $(MKDOCS) build $(MKDOCSBUILDOPTS)
|
|
|
|
MKDOCSSERVE = $(MKDOCS) serve -a 0.0.0.0:8000
|
|
|
|
|
|
|
|
|
|
|
|
BUILD_CMD := $(MKDOCSBUILD) --site-dir $(BUILDDIR) && \
|
|
|
|
echo && \
|
|
|
|
echo "Build finished. The HTML pages are in $(BUILDDIR)."
|
|
|
|
|
|
|
|
TEST_CMD := grep -q "<title>Notebook</title>" $(BUILDDIR)/index.html && \
|
|
|
|
echo && \
|
|
|
|
echo "Test finished. The HTML pages are in $(BUILDDIR)."
|
|
|
|
|
|
|
|
filter:
|
|
|
|
rm -rf $(DOCFOLDER)
|
|
|
|
mkdir $(DOCFOLDER)
|
|
|
|
cp README.md $(DOCFOLDER)/index.md
|
|
|
|
for item in $(INCLUDE_ITEM); do \
|
|
|
|
cp -r $${item} $(DOCFOLDER) ;\
|
|
|
|
done;\
|
|
|
|
|
|
|
|
build: deps
|
|
|
|
$(BUILD_CMD)
|
|
|
|
|
|
|
|
serve: deps
|
|
|
|
$(MKDOCSSERVE)
|
|
|
|
|
|
|
|
clean:
|
2020-11-28 07:50:10 +00:00
|
|
|
rm -rf $(DOCFOLDER)/*
|
2020-11-26 17:38:25 +00:00
|
|
|
rm -rf $(BUILDDIR)/*
|
|
|
|
|
|
|
|
deps:
|
2021-01-21 21:14:39 +00:00
|
|
|
pip install -r requirements.txt --upgrade
|
2020-11-26 17:38:25 +00:00
|
|
|
|
|
|
|
test: build
|
|
|
|
$(TEST_CMD)
|
|
|
|
|
|
|
|
install: filter test
|
|
|
|
|
|
|
|
run: filter serve
|