2017-06-22 12:09:47 +08:00
|
|
|
BOOK_NAME := kubernetes-handbook
|
|
|
|
BOOK_OUTPUT := _book
|
2019-07-31 20:11:27 +08:00
|
|
|
image := jimmysong/gitbook-builder:2019-07-31
|
2019-07-25 16:58:57 +08:00
|
|
|
docker := docker run -t -i --sig-proxy=true --rm -v $(shell pwd):/gitbook -w /gitbook -p 4000:4000 $(image)
|
2017-06-22 12:09:47 +08:00
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build:
|
2019-07-25 16:58:57 +08:00
|
|
|
@$(docker) scripts/build-gitbook.sh
|
2018-09-25 22:13:40 +08:00
|
|
|
|
|
|
|
.PHONY: lint
|
|
|
|
lint:
|
2019-07-25 16:58:57 +08:00
|
|
|
@$(docker) scripts/lint-gitbook.sh
|
2019-04-12 00:03:10 +08:00
|
|
|
htmlproofer --url-ignore "/localhost/,/172.17.8.101/,/172.20.0.113/,/slideshare.net/,/grpc.io/,/kiali.io/,/condiut.io/,/twitter.com/,/facebook.com/,/medium.com/,/google.com/,/jimmysong.io/,/openfaas.com/,/linkerd.io/,/layer5.io/,/thenewstack.io/,/blog.envoyproxy.io/,/blog.openebs.io/,/k8smeetup.github.io/,/blog.heptio.com/,/apigee.com/,/speakerdeck.com/,/download.svcat.sh/,/blog.fabric8.io/,/blog.heptio.com/,/blog.containership.io/,/blog.mobyproject.org/,/blog.spinnaker.io/,/coscale.com/,/zh.wikipedia.org/,/labs.play-with-k8s.com/,/cilium.readthedocs.io/,/azure.microsoft.com/,/storageos.com/,/openid.net/,/prometheus.io/,/coreos.com/,/openwhisk.incubator.apache.org/" $(BOOK_OUTPUT)
|
2017-06-22 12:09:47 +08:00
|
|
|
|
2019-07-25 16:58:57 +08:00
|
|
|
.PHONY: install
|
|
|
|
install:
|
|
|
|
@$(docker) gitbook install
|
|
|
|
|
2017-06-22 12:09:47 +08:00
|
|
|
.PHONY: serve
|
|
|
|
serve:
|
2019-07-25 16:58:57 +08:00
|
|
|
@$(docker) gitbook serve . $(BOOK_OUTPUT)
|
2017-06-22 12:09:47 +08:00
|
|
|
|
|
|
|
.PHONY: epub
|
|
|
|
epub:
|
2019-07-25 16:58:57 +08:00
|
|
|
@$(docker) gitbook epub . $(BOOK_NAME).epub
|
2017-06-22 12:09:47 +08:00
|
|
|
|
|
|
|
.PHONY: pdf
|
|
|
|
pdf:
|
2019-07-25 16:58:57 +08:00
|
|
|
@$(docker) gitbook pdf . $(BOOK_NAME).pdf
|
2017-06-22 12:09:47 +08:00
|
|
|
|
|
|
|
.PHONY: mobi
|
|
|
|
mobi:
|
2019-07-25 16:58:57 +08:00
|
|
|
@$(docker) gitbook mobi . $(BOOK_NAME).mobi
|
2017-06-22 12:09:47 +08:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -rf $(BOOK_OUTPUT)
|
|
|
|
|
|
|
|
.PHONY: help
|
|
|
|
help:
|
|
|
|
@echo "Help for make"
|
|
|
|
@echo "make - Build the book"
|
|
|
|
@echo "make build - Build the book"
|
|
|
|
@echo "make serve - Serving the book on localhost:4000"
|
|
|
|
@echo "make install - Install gitbook and plugins"
|
|
|
|
@echo "make epub - Build epub book"
|
|
|
|
@echo "make pdf - Build pdf book"
|
|
|
|
@echo "make clean - Remove generated files"
|