Skip to content

Commit

Permalink
update: makefile example for mkdocs using python virtual environment
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalli-johnny committed Nov 22, 2024
1 parent 94c03c2 commit fae7264
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions docs/posts/2024/september/30.md
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ A python virtual environment was created and then Material for MkDocs python pac
!!! NOTE "Run local server for Material for MkDocs"

```shell
source ~/.local/venv/bin/activate && mkdocs build
. ~/.local/venv/bin/activate; mkdocs build
```

!!! HINT "Makefile task to run server"
Expand All @@ -434,21 +434,17 @@ A python virtual environment was created and then Material for MkDocs python pac
# ------------------------------------ #

# --- Documentation Generation ------ #
python-venv: ## Enable Python Virtual Environment for MkDocs
$(info --------- Mkdocs Local Server ---------)
source ~/.local/venv/bin/activate

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

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

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

Expand Down

0 comments on commit fae7264

Please sign in to comment.