docmachine-containers/tasks/docs.mk

71 lines
1.6 KiB
Makefile
Raw Normal View History

# vim: set ft=make :
prepare-docs: ## install prerequisites for static docs site only
pipenv install
.PHONY: prepare-docs
prepare: prepare-docs
sync-docs-internal:
@>&2 echo "ERROR: not implemented"
exit 1
clean-docs: ## remove generated static docs site
rm -fr $(BUILD_DOCS_DIR)
.PHONY: clean-docs
clean: clean-docs
2024-09-22 22:08:33 +00:00
# deploy-docs: ## deploy static docs site to github
# git push $(DEPLOY_REPO)
# pipenv run mkdocs gh-deploy $(DEPLOY_OPTS)
2024-09-22 22:08:33 +00:00
# .PHONY: deploy-docs
# deploy: deploy-docs
build-docs-pdf: ## build pdf docs only
mkdir -p $(BUILD_DOCS_DIR)
rm -f $(BUILD_DOCS_DIR)/combined.pdf
PYTHONUTF8=1 \
ENABLE_PDF_EXPORT=1 \
pipenv run mkdocs build \
--site-dir $(BUILD_DOCS_DIR)
pdftk \
$$(find -L $(BUILD_DOCS_DIR) -name *.pdf -not -name index.pdf |sort ) \
cat output $(BUILD_DOCS_DIR)/docs.pdf
.PHONY: build-docs-pdf
build-docs: build-docs-pdf
build-docs-html: ## build static docs site only
mkdir -p $(BUILD_DOCS_DIR)
pipenv run mkdocs build \
--site-dir $(BUILD_DOCS_DIR)
.PHONY: build-docs-html
build-docs: build-docs-html
build: build-docs
watch-docs-internal:
pipenv run mkdocs serve --dev-addr 0.0.0.0:$(DOCS_PORT)
.PHONY: watch-docs-internal
watch-docs: ## run development server for static docs site
2024-09-22 21:42:11 +00:00
pipenv run honcho start watch-docs watch-toc
.PHONY: watch-docs
watch: watch-docs
2024-09-22 23:03:10 +00:00
build-pdf: build-docs-pdf ## build docs as PDF files
build-html: build-docs-html ## build docs as HTML files
build-docs: build-docs-pdf build-docs-html ## build only docs as PDF and HTML
serve-docs: watch-docs
.PHONY: watch-docs serve-docs
.PHONY: watch-docs-internal