Files
mkdocs-boilerplate/Makefile
T
2026-06-21 12:18:19 +08:00

48 lines
1.1 KiB
Makefile

.DEFAULT_GOAL := help
.PHONY: live site image run help
## live: Run mkdocs with live-reloading (localhost:3000)
live:
@echo "Wait until container starts and open http://localhost:3000 to see live preview"
@docker run \
--pull always \
--rm \
--interactive \
--tty \
--publish 3000:8000 \
--volume ${PWD}:/docs \
--name my-project-docs-dev \
squidfunk/mkdocs-material:9.6.20
## site: Build local static site
site:
@echo "Wait until mkdocs finish"
@docker run \
--pull always \
--rm \
--interactive \
--tty \
--volume ${PWD}:/docs \
--name my-project-docs-dev \
squidfunk/mkdocs-material:9.6.20 build
## image: Build docker image
image:
@docker build \
--tag my-project-docs-dev:latest \
.
## run: Run docker image (localhost:3001)
run:
@echo "Wait until container starts and open http://localhost:3001 to see ready static website"
@docker run \
--rm \
--publish 3001:80 \
--name my-project-docs-dev \
my-project-docs-dev:latest
## help: Show this message and exit
help: Makefile
@echo "Available recipes:"
@sed -n 's/^##/ /p' $< | column -t -s ':'