Skip to content

Commit 24d323f

Browse files
dev: use python virtual env for mkdocs tasks in Makefile
1 parent a09f27d commit 24d323f

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- clojure-cli: update donut system and system-repl examples
1616
- reference: code block and admonition for common regular expression examples
1717
- intro: use link for contribute and writing tips in practical.li main website
18+
- dev: use python virtual env for mkdocs tasks in Makefile
1819

1920
# 2024-03-03
2021

Makefile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# ------- Makefile Variables --------- #
1212
# run help if no target specified
1313
.DEFAULT_GOAL := help
14+
SHELL := /usr/bin/zsh
1415

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

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

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

55-
docs-build: ## Build mkdocs
56+
docs-changed: ## Build only changed files and run mkdocs in local server (python venv)
5657
$(info --------- Mkdocs Local Server ---------)
57-
mkdocs build
58+
source ~/.local/venv/bin/activate && $(MKDOCS_SERVER) --dirtyreload
59+
60+
docs-build: ## Build mkdocs (python venv)
61+
$(info --------- Mkdocs Local Server ---------)
62+
source ~/.local/venv/bin/activate && mkdocs build
5863
# ------------------------------------ #
5964

6065
# ------------ Help ------------------ #

0 commit comments

Comments
 (0)