Add docs command to build and serve documentation

This commit is contained in:
Vikash Kothary 2020-07-30 20:21:33 +01:00
parent afedcf719e
commit b8c27ef1e6
2 changed files with 14 additions and 0 deletions

View File

@ -13,6 +13,10 @@ export
help: help:
@awk 'BEGIN {FS = " ?#?: "; print ""${ANKI_SERVER_NAME}" "${ANKI_SERVER_VERSION}"\n"${ANKI_SERVER_DESCRIPTION}"\n\nUsage: make \033[36m<command>\033[0m\n\nCommands:"} /^.PHONY: ?[a-zA-Z_-]/ { printf " \033[36m%-10s\033[0m %s\n", $$2, $$3 }' $(MAKEFILE_LIST) @awk 'BEGIN {FS = " ?#?: "; print ""${ANKI_SERVER_NAME}" "${ANKI_SERVER_VERSION}"\n"${ANKI_SERVER_DESCRIPTION}"\n\nUsage: make \033[36m<command>\033[0m\n\nCommands:"} /^.PHONY: ?[a-zA-Z_-]/ { printf " \033[36m%-10s\033[0m %s\n", $$2, $$3 }' $(MAKEFILE_LIST)
.PHONY: docs #: Build and serve documentation.
docs: print-env
@${MKDOCS} ${MKDOCS_OPTION} -f docs/mkdocs.yml
%: %:
@test -f scripts/${*}.sh @test -f scripts/${*}.sh
@${SHELL} scripts/${*}.sh @${SHELL} scripts/${*}.sh

View File

@ -0,0 +1,10 @@
# .env.example (anki-sync-server)
## Make
MKDOCS=mkdocs
## Mkdocs
MKDOCS_OPTION=serve
## Path
PATH:=.venv/bin/path:${PATH}