1
0

Перевод на zensical и актуализация

This commit is contained in:
2026-07-11 15:09:32 +08:00
parent 7ec67ef918
commit 82a98edf00
18 changed files with 1771 additions and 874 deletions
+34 -27
View File
@@ -1,47 +1,54 @@
.DEFAULT_GOAL := help
.PHONY: live site image run help
.PHONY: live site image push run help
## live: Run mkdocs with live-reloading (localhost:3000)
## live = Run zensical with live-reloading on http://localhost:8000
live:
@echo "Wait until container starts and open http://localhost:3000 to see live preview"
@docker run \
--pull always \
@echo "*** Wait until container starts and open http://localhost:8000 to see live preview"
@docker stop boilerplate-docs-dev 2>/dev/null; \
docker run \
--rm \
--interactive \
--tty \
--publish 3000:8000 \
--env PYTHONPATH=/docs \
--publish 8000:8000 \
--volume ${PWD}:/docs \
--name my-project-docs-dev \
squidfunk/mkdocs-material:9.6.20
--name boilerplate-docs-dev \
zensical/zensical:latest
## site: Build local static site
## site = Build a local static site
site:
@echo "Wait until mkdocs finish"
@docker run \
@echo "*** Wait until zensical finish"
@docker stop boilerplate-docs-dev 2>/dev/null; \
docker run \
--pull always \
--rm \
--interactive \
--tty \
--env PYTHONPATH=/docs \
--volume ${PWD}:/docs \
--name my-project-docs-dev \
squidfunk/mkdocs-material:9.6.20 build
--name boilerplate-docs-dev \
zensical/zensical:latest \
build \
--clean
## image: Build docker image
## image = Build a docker image
image:
@docker build \
--tag my-project-docs-dev:latest \
.
@docker build --tag harbor.example.com/boilerplate-docs:latest .
## run: Run docker image (localhost:3001)
## run = Run docker container from image built with `make image` on http://localhost:8001
run:
@echo "Wait until container starts and open http://localhost:3001 to see ready static website"
@docker run \
@echo "*** Wait until container starts and open http://localhost:8001 to see ready static website"
@docker stop boilerplate-docs 2>/dev/null; \
docker run \
--rm \
--publish 3001:80 \
--name my-project-docs-dev \
my-project-docs-dev:latest
--publish 8001:80 \
--name boilerplate-docs \
harbor.example.com/boilerplate-docs:latest
## help: Show this message and exit
## push = Push docker image built with `make image` to harbor.example.com
push:
@docker login harbor.example.com; \
docker push harbor.example.com/boilerplate-docs:latest
## help = Show this message and exit (default)
help: Makefile
@echo "Available recipes:"
@sed -n 's/^##/ /p' $< | column -t -s ':'
@sed -n 's/^##/ /p' $< | column -t -s '='