Skip to content

Commit

Permalink
dev: use python virtual env for mkdocs tasks in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalli-johnny committed Dec 17, 2024
1 parent a09f27d commit 24d323f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- clojure-cli: update donut system and system-repl examples
- reference: code block and admonition for common regular expression examples
- intro: use link for contribute and writing tips in practical.li main website
- dev: use python virtual env for mkdocs tasks in Makefile

# 2024-03-03

Expand Down
17 changes: 11 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# ------- Makefile Variables --------- #
# run help if no target specified
.DEFAULT_GOAL := help
SHELL := /usr/bin/zsh

# Column the target description is printed from
HELP-DESCRIPTION-SPACING := 24
Expand Down Expand Up @@ -44,17 +45,21 @@ megalinter-upgrade: ## Upgrade MegaLinter config to latest version
# ------------------------------------ #

# --- Documentation Generation ------ #
docs: ## Build and run mkdocs in local server
python-venv: ## Enable Python Virtual Environment for MkDocs
$(info --------- Mkdocs Local Server ---------)
$(MKDOCS_SERVER)
source ~/.local/venv/bin/activate

docs-changed: ## Build only changed files and run mkdocs in local server
docs: ## Build and run mkdocs in local server (python venv)
$(info --------- Mkdocs Local Server ---------)
$(MKDOCS_SERVER) --dirtyreload
source ~/.local/venv/bin/activate && $(MKDOCS_SERVER)

docs-build: ## Build mkdocs
docs-changed: ## Build only changed files and run mkdocs in local server (python venv)
$(info --------- Mkdocs Local Server ---------)
mkdocs build
source ~/.local/venv/bin/activate && $(MKDOCS_SERVER) --dirtyreload

docs-build: ## Build mkdocs (python venv)
$(info --------- Mkdocs Local Server ---------)
source ~/.local/venv/bin/activate && mkdocs build
# ------------------------------------ #

# ------------ Help ------------------ #
Expand Down

0 comments on commit 24d323f

Please sign in to comment.